Skip to content

Commit 3f2534f

Browse files
committed
adding run_benchmarks.sh for hyperfine tests
1 parent c8b10a5 commit 3f2534f

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

dev/run_benchmarks.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
# Check if the file exists before removing it
4+
if [ -f "tmp/codeowners_benchmarks.md" ]; then
5+
rm tmp/codeowners_benchmarks.md
6+
fi
7+
8+
echo "To run these benchmarks on your application, you can place this repo next to your rails application and run bash ../rubyatscale/codeowners-rs/dev/run_benchmarks.sh from the root of your application" >> tmp/codeowners_benchmarks.md
9+
10+
hyperfine --warmup=2 --runs=3 --export-markdown tmp/codeowners_benchmarks.md \
11+
'../rubyatscale/codeowners-rs/target/release/codeowners gv' \
12+
'bin/codeowners-rs gv'

src/cache/file.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ mod tests {
149149
})
150150
);
151151

152+
cache.delete_cache().change_context(Error::Io)?;
153+
assert!(!persisted_cache_path.exists());
154+
152155
Ok(())
153156
}
154157

0 commit comments

Comments
 (0)