Add scripts for running perf and callgrind.

This commit is contained in:
Tom Alexander
2023-08-21 01:26:52 -04:00
parent 8561fdc1bd
commit 655af88cdf
4 changed files with 43 additions and 10 deletions

13
scripts/callgrind.bash Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
#
set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR/../"
RUSTFLAGS="-C opt-level=0" cargo build --no-default-features
valgrind --tool=callgrind --callgrind-out-file=callgrind.out target/debug/compare
echo "You probably want to run:"
echo "callgrind_annotate --auto=yes callgrind.out"