aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-09 10:06:09 -0500
committerJesse Luehrs <doy@tozt.net>2019-11-09 14:58:57 -0500
commitdbf02d880407df0667b56e52290decaab752a199 (patch)
tree993fa680b8248c60be182de640b5e5d88795089a /bin
parent1df95eca71e5f2a9cb9adb2995a7552ec980dc8b (diff)
downloadvt100-rust-dbf02d880407df0667b56e52290decaab752a199.tar.gz
vt100-rust-dbf02d880407df0667b56e52290decaab752a199.zip
add a more realistic benchmark
Diffstat (limited to 'bin')
-rwxr-xr-xbin/perf7
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/perf b/bin/perf
index 9a70b08..6accd27 100755
--- a/bin/perf
+++ b/bin/perf
@@ -1,7 +1,7 @@
#!/bin/sh
set -eux
-rm -f target/release/* perf.* || true
+rm -f target/release/examples/* perf.* || true
if ! grep -q debug Cargo.toml; then
cat >> Cargo.toml <<EOF
@@ -9,9 +9,8 @@ if ! grep -q debug Cargo.toml; then
debug = true
EOF
fi
-cargo test --release --no-run
-bin=$(find ./target/release -maxdepth 1 -name '*split_escape*' -not -name '*.d')
-perf record -F99 --call-graph dwarf,16384 "$bin" --ignored
+cargo build --release --example perf
+perf record -F99 --call-graph dwarf,16384 target/release/examples/perf --ignored > /dev/null
perf script > perf.script
perl ~/coding/src/FlameGraph/stackcollapse-perf.pl perf.script > perf.collapsed
perl ~/coding/src/FlameGraph/flamegraph.pl perf.collapsed > perf.svg