Skip to content

Commit d3c2912

Browse files
committed
profile: Script for easily profiling the benchmarks
1 parent 08a9773 commit d3c2912

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

profile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh
2+
3+
if [ "$#" -lt "2" ]
4+
then
5+
cat <<-tac
6+
USAGE: $0 <test> <profiler>...
7+
8+
<test> is which benchmark to run (or an empty string for all)
9+
<profiler> is the profiler and command-line arguments, e.g.,:
10+
time
11+
strace -c
12+
valgrind --tool=callgrind --collect-atstart=no --toggle-collect=bencher::Bencher::iter
13+
14+
Only release builds of the inger benchmark are supported. Note that you probably
15+
want to enable debug symbols by adding the following to Cargo.toml before building:
16+
[profile.bench]
17+
debug = true
18+
[profile.release]
19+
debug = true
20+
tac
21+
exit 1
22+
fi
23+
24+
test="$1"
25+
shift
26+
27+
LIBGOTCHA_NOGLOBALS= LD_LIBRARY_PATH=target/release/deps exec "$@" target/release/inger-*[!.]? $test

0 commit comments

Comments
 (0)