Skip to content

Commit

Permalink
Make comparison script run all large test files
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhoo committed Jan 29, 2019
1 parent 17e6e4c commit a35ee3c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -2,4 +2,3 @@
**/*.rs.bk
/perf*
*.log
/FlameGraph/
19 changes: 13 additions & 6 deletions compare.sh
@@ -1,11 +1,18 @@
#!/usr/bin/env bash

set -eu -o pipefail
set -x

[[ -d ./FlameGraph ]] || git clone https://github.com/brendangregg/FlameGraph &
cargo build --release &

wait
hyperfine './target/release/inferno-collapse-perf --all test/perf-iperf-stacks-pidtid-01.txt' './FlameGraph/stackcollapse-perf.pl --all test/perf-iperf-stacks-pidtid-01.txt'
cargo build --release --bin inferno-collapse-perf
BIN="${CARGO_TARGET_DIR:-target}/release/inferno-collapse-perf"

(( maxsize = 100 * 1024 ))
for f in ./flamegraph/test/*.txt; do
# only run benchmark on larger files
filesize=$(stat -c%s "$f")
if (( filesize > maxsize )); then
echo "==> $f <=="
hyperfine "$BIN --all $f" "./flamegraph/stackcollapse-perf.pl --all $f"
echo
echo
fi
done

0 comments on commit a35ee3c

Please sign in to comment.