Skip to content

Commit

Permalink
#19 show cycles count
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Apr 22, 2023
1 parent fd6552b commit 56c469f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rebuild_benchmark.sh
Expand Up @@ -9,13 +9,14 @@ cp tests/benchmark.rs src/bin/benchmark.rs
sed -E -i 's/\[dev-dependencies\]//g' Cargo.toml

capacities="1 2 4 8 16 32 64 128"
cycles=1000000

rm -rf target/benchmark
mkdir -p target/benchmark
for capacity in ${capacities}; do
sed -E -i "s/CAPACITY: usize = [0-9]+/CAPACITY: usize = ${capacity}/g" src/bin/benchmark.rs
cargo build --release
./target/release/benchmark 1000000 > target/benchmark/${capacity}.out
./target/release/benchmark ${cycles} > target/benchmark/${capacity}.out
done

{
Expand Down Expand Up @@ -53,6 +54,8 @@ done
done
echo ''
done
echo ''
echo "There were ${cycles} repetition cycles."
} > target/benchmark/table.md

perl -e '
Expand Down

0 comments on commit 56c469f

Please sign in to comment.