Profile using binary input

This commit is contained in:
RunasSudo 2022-08-21 06:14:34 +10:00
parent 3902c37768
commit 6ff111054c
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
3 changed files with 11 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
cargo build --release || exit
perf stat -r 5 --table -o benchmark.log ./target/release/opentally stv '/home/runassudo/git/stvdb/Australian Senate/2022/VIC.blt' --round-votes 0 --round-quota 0 --quota droop --quota-criterion geq --ties backwards random --random-seed 20210727 --surplus uig --surplus-order by_order --exclusion by_value --pp-decimals 0 $@
perf stat -r 5 --table -o benchmark.log ./target/release/opentally stv tests/data/raw/VIC2022.bin --bin --round-votes 0 --round-quota 0 --quota droop --quota-criterion geq --ties backwards random --random-seed 20210727 --surplus uig --surplus-order by_order --exclusion by_value --pp-decimals 0 $@
cat benchmark.log
git describe --always --dirty=-dev | tee -a benchmark.log

3
mkbaseline.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
mv benchmark.log benchmark.baseline.log
mv perf.data perf.baseline.data

View File

@ -1,4 +1,9 @@
#!/bin/bash
cargo build --profile perf || exit
/bin/rm perf.data
perf record -g --call-graph=dwarf ./target/perf/opentally stv '/home/runassudo/git/stvdb/Australian Senate/2022/VIC.blt' --round-votes 0 --round-quota 0 --quota droop --quota-criterion geq --ties backwards random --random-seed 20210727 --surplus uig --surplus-order by_order --exclusion by_value --pp-decimals 0 $@
rm perf.data
# Burn in
./target/perf/opentally stv tests/data/raw/VIC2022.bin --bin --round-votes 0 --round-quota 0 --quota droop --quota-criterion geq --ties backwards random --random-seed 20210727 --surplus uig --surplus-order by_order --exclusion by_value --pp-decimals 0 $@
# Profile
perf record -g --call-graph=dwarf ./target/perf/opentally stv tests/data/raw/VIC2022.bin --bin --round-votes 0 --round-quota 0 --quota droop --quota-criterion geq --ties backwards random --random-seed 20210727 --surplus uig --surplus-order by_order --exclusion by_value --pp-decimals 0 $@