From 55f2e8816a147995dd8428eb9154855eed6635f2 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Sun, 21 Aug 2022 07:31:32 +1000 Subject: [PATCH] Update scripts --- .gitignore | 3 --- benchmark.sh | 6 +++--- build_homepage.sh | 7 +++++++ coverage.sh | 3 +-- mkbaseline.sh | 4 ++-- profile.sh | 2 +- 6 files changed, 14 insertions(+), 11 deletions(-) create mode 100755 build_homepage.sh diff --git a/.gitignore b/.gitignore index 769c283..2f43d2c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,6 @@ /html/opentally.js /html/opentally_*.wasm -/benchmark*.log -/perf*.data - /homepage/_news.html # Jekyll diff --git a/benchmark.sh b/benchmark.sh index 0142236..7e5703f 100755 --- a/benchmark.sh +++ b/benchmark.sh @@ -1,7 +1,7 @@ #!/bin/bash cargo build --release || exit -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 $@ +perf stat -r 5 --table -o target/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 +cat target/benchmark.log +git describe --always --dirty=-dev | tee -a target/benchmark.log diff --git a/build_homepage.sh b/build_homepage.sh new file mode 100755 index 0000000..8cb4722 --- /dev/null +++ b/build_homepage.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +DESTDIR='/home/runassudo/Documents/Work/School Cloud Data/unenc/public/www/opentally' + +cd homepage +bundle exec jekyll build -d "$DESTDIR" +cd .. diff --git a/coverage.sh b/coverage.sh index 189b96b..381096d 100755 --- a/coverage.sh +++ b/coverage.sh @@ -4,8 +4,7 @@ PATH=$PATH:$HOME/.cargo/bin mkdir -p target/coverage/prof rm target/coverage/prof/*.profraw -export RUSTC=./rustc_bs.sh -export RUSTFLAGS="-Zinstrument-coverage -Copt-level=0 -Clink-dead-code" +export RUSTFLAGS="-Cinstrument-coverage -Copt-level=0 -Clink-dead-code" export LLVM_PROFILE_FILE="target/coverage/prof/opentally-%p-%m.profraw" export CARGO_TARGET_DIR=target/coverage cargo test diff --git a/mkbaseline.sh b/mkbaseline.sh index 83690e4..3fe14fe 100755 --- a/mkbaseline.sh +++ b/mkbaseline.sh @@ -1,3 +1,3 @@ #!/bin/bash -mv benchmark.log benchmark.baseline.log -mv perf.data perf.baseline.data +mv target/benchmark.log target/benchmark.baseline.log +mv target/perf.data target/perf.baseline.data diff --git a/profile.sh b/profile.sh index 3785d7f..d4e5564 100755 --- a/profile.sh +++ b/profile.sh @@ -6,4 +6,4 @@ rm perf.data ./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 $@ +perf record -g -o target/perf.data --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 $@