Skip to content

Commit 970285b

Browse files
authored
Add script to measure max memory usage of benchmarks (#2452)
This is a very minimal version of this idea, currently only focused on TPCH/Clickbench
1 parent a18b39a commit 970285b

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

bench-vortex/scripts/peak-mem.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env bash
2+
3+
set -o errexit
4+
set -o nounset
5+
set -o pipefail
6+
7+
if ! [ -x $(which gtime) ]
8+
then
9+
echo "It appears you're missing gtime, its available on brew as 'gnu-time'.";
10+
exit 1;
11+
fi
12+
13+
export RUST_LOG="OFF"
14+
OUTPUT_FILE="output.txt"
15+
echo "Writing results to $OUTPUT_FILE"
16+
17+
# Clear output file
18+
> $OUTPUT_FILE
19+
20+
echo "Building binaries with mimalloc"
21+
cargo build --bin tpch --bin clickbench --release --features mimalloc
22+
23+
for i in "tpch 1 22" "clickbench 0 42"; do
24+
set -- $i
25+
benchmark=$1
26+
range_start=$2
27+
range_end=$3
28+
29+
for q in $(seq $range_start $range_end); do
30+
echo "running $benchmark q $q";
31+
32+
gtime -f %M target/release/$benchmark -q $q -i 2 --formats vortex 2>> $OUTPUT_FILE
33+
done
34+
done

0 commit comments

Comments
 (0)