Skip to content

Commit

Permalink
feat: add benchmark date for future reference
Browse files Browse the repository at this point in the history
  • Loading branch information
farbodahm committed Apr 1, 2024
1 parent 144481f commit 2b00ce8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions benchmarks/take_benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ benchmarks=$(go test ./... -list Benchmark | grep ^Benchmark)

for benchmark in $benchmarks; do
echo "Running $benchmark"

benchmark_date=$(date +"%Y-%m-%d_%H-%M")

cpu_profile="benchmarks/${benchmark}_cpu.prof"
mem_profile="benchmarks/${benchmark}_mem.prof"
cpu_profile="benchmarks/${benchmark_date}_${benchmark}_cpu.prof"
mem_profile="benchmarks/${benchmark_date}_${benchmark}_mem.prof"

# Run the benchmark with CPU profiling enabled
go test -run=^$ -bench "^$benchmark$" github.com/farbodahm/streame/benchmarks -count=10 -cpuprofile="$cpu_profile" -memprofile="$mem_profile"
Expand Down

0 comments on commit 2b00ce8

Please sign in to comment.