From 95febf51f7a33738802ef823a603db9f0f1dfd47 Mon Sep 17 00:00:00 2001 From: James Hoffman Date: Sun, 6 Apr 2025 18:13:17 -0600 Subject: [PATCH] Add benchmark.sh --- benchmark.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 benchmark.sh diff --git a/benchmark.sh b/benchmark.sh new file mode 100755 index 0000000..27bd573 --- /dev/null +++ b/benchmark.sh @@ -0,0 +1,10 @@ +#!/bin/bash +mkdir ./.time-bench +hyperfine --prepare 'if test -d demo/.time; then rm -r ./.time-bench && cp -rT demo/.time ./.time-bench; fi && rm -rf demo && cp -r demo.bak demo' './target/release/ftm -c ./config.json' 'cd demo && git init && git add ./* && git commit -m "Add demo"' --export-json initial_run.json --runs 30 +du -hs .time-bench # .time is copied in the prepare step +rm -r .time-bench +du -hs demo/.git + +hyperfine --prepare 'rm -rf demo && cp -r demo.bak demo && ./target/release/ftm -c ./config.json && cd demo && git init && git add ./* && git commit -m "Add demo" && cd .. && rm -r demo/* && cp -r src demo/' './target/release/ftm -c ./config.json' 'cd demo && git add ./* && git commit -m "Update to src"' --export-json second-run.json --runs 30 +du -hs demo/.time +du -hs demo/.git