Skip to content

Commit cb24281

Browse files
committed
fix: naming
1 parent d4370d6 commit cb24281

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

arrow/benches/interleave_kernels.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ fn add_benchmark(c: &mut Criterion) {
184184
for len in [100, 1024, 2048] {
185185
bench_values(
186186
c,
187-
&format!("interleave list struct with logically_equivalent_dict) {len}"),
187+
&format!("interleave list struct with logically_equivalent_dict {len}"),
188188
len,
189189
&struct_lists
190190
.iter()
@@ -220,7 +220,7 @@ fn add_benchmark(c: &mut Criterion) {
220220
for len in [100, 1024, 2048] {
221221
bench_values(
222222
c,
223-
&format!("interleave list struct with logically_equivalent_dict) {len}"),
223+
&format!("interleave list struct with same dict ptr {len}"),
224224
len,
225225
&struct_lists
226226
.iter()

bench_temp.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/bash
2+
#
3+
# run bench for 2 git hash/branch/tag
4+
#
5+
# ./dev/bench/run_bench.sh [baseline] [compare]
6+
7+
set -e
8+
9+
function patch_cargo_toml() {
10+
if [[ ! -z $(grep "bench = false" arrow/Cargo.toml) ]]; then
11+
echo "Patch not required"
12+
else
13+
echo "Patch required"
14+
cp arrow/Cargo.toml arrow/Cargo.toml.org
15+
sed '/^\[lib\]/a bench = false' arrow/Cargo.toml.org > arrow/Cargo.toml
16+
fi
17+
}
18+
19+
function run_bench( ) {
20+
cmd="cargo bench ${EXTRA_ARGS} -- --save-baseline arrow-$1"
21+
echo $cmd
22+
bash -c "$cmd"
23+
}
24+
25+
26+
# checkout baseline and run bench
27+
git checkout $1
28+
29+
patch_cargo_toml
30+
run_bench $1
31+
32+
# checkout compare and run bench
33+
git reset --hard
34+
git checkout $2
35+
36+
patch_cargo_toml
37+
run_bench $2
38+
39+
# usage ./bench.sh HEAD main
40+
# to only run some bench, use EXTRA_ARGS="--bench interleave_kernels \"interleave list struct.*\"" ./bench.sh HEAD main

0 commit comments

Comments
 (0)