Skip to content

Commit b15c0be

Browse files
committed
adding for file benchmarks
1 parent 66c46e9 commit b15c0be

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

dev/run_benchmarks_for_file.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
mkdir -p tmp
4+
5+
# Check if the file exists before removing it
6+
if [ -f "tmp/codeowners_for_file_benchmarks.md" ]; then
7+
rm tmp/codeowners_for_file_benchmarks.md
8+
fi
9+
10+
echo "To run these benchmarks on your application, you can place this repo next to your rails application and run /usr/bin/env bash ../rubyatscale/codeowners-rs/dev/run_benchmarks_for_file.sh <path/to/file>" >> tmp/codeowners_for_file_benchmarks.md
11+
12+
hyperfine --warmup=2 --runs=3 --export-markdown tmp/codeowners_for_file_benchmarks.md \
13+
"../rubyatscale/codeowners-rs/target/release/codeowners for-file \"$1\"" \
14+
"bin/codeowners for_file \"$1\"" \
15+
"bin/codeownership for_file \"$1\""
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
# Check if the file exists before removing it
44
if [ -f "tmp/codeowners_benchmarks.md" ]; then
5-
rm tmp/codeowners_benchmarks.md
5+
rm tmp/codeowners_benchmarks_gv.md
66
fi
77

8-
echo "To run these benchmarks on your application, you can place this repo next to your rails application and run /usr/bin/env bash ../rubyatscale/codeowners-rs/dev/run_benchmarks.sh from the root of your application" >> tmp/codeowners_benchmarks.md
8+
echo "To run these benchmarks on your application, you can place this repo next to your rails application and run /usr/bin/env bash ../rubyatscale/codeowners-rs/dev/run_benchmarks_for_gv.sh from the root of your application" >> tmp/codeowners_benchmarks_gv.md
99

10-
hyperfine --warmup=2 --runs=3 --export-markdown tmp/codeowners_benchmarks.md \
10+
hyperfine --warmup=2 --runs=3 --export-markdown tmp/codeowners_benchmarks_gv.md \
1111
'../rubyatscale/codeowners-rs/target/release/codeowners gv' \
12-
'bin/codeowners-rs gv'
12+
'bin/codeowners validate' \
13+
'bin/codeownership validate'

0 commit comments

Comments
 (0)