Skip to content

Commit

Permalink
Improve benchmark script (ordinals#493)
Browse files Browse the repository at this point in the history
- Fix file ownership
- Record elapsed time
- Save index.redb from each run
  • Loading branch information
casey authored and raphjaph committed Sep 9, 2022
1 parent fabd154 commit 5758524
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions bin/benchmark
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,22 @@ set -euxo pipefail
rm -rf benchmark
mkdir benchmark

cd benchmark

for HEIGHT_LIMIT in 100 250 500 1000 2000; do
sudo \
/usr/bin/time -o $HEIGHT_LIMIT.time sudo \
CARGO_PROFILE_RELEASE_DEBUG=true \
RUST_LOG=info \
cargo flamegraph \
--deterministic \
--bin ord \
--output benchmark/$HEIGHT_LIMIT.svg \
--output $HEIGHT_LIMIT.svg \
-- \
--chain signet \
--data-dir benchmark \
--data-dir . \
--height-limit $HEIGHT_LIMIT \
index
sudo chown -n $UID $HEIGHT_LIMIT.svg
sudo chown -n $UID index.redb
mv index.redb $HEIGHT_LIMIT.redb
done

0 comments on commit 5758524

Please sign in to comment.