Skip to content

Commit

Permalink
chore(benchmarks): running benchmarks and adding results to the repo
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperFola committed Oct 12, 2024
1 parent 42670fc commit ee87cf3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/benchmarks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Benchmarks

## Running the benchmarks and storing the results

1. Run for the repository root
2. Make sure the target `arkscript` has been compiled in release mode, as well as `bench`
```bash
result="tests/benchmarks/results/$(set -- tests/benchmarks/results/*.csv; echo $#)-$(git rev-parse --short HEAD).csv"
cmake-build-release/bench \
--benchmark_min_warmup_time=1 \
--benchmark_format=csv \
--benchmark_time_unit=ms \
--v=0 | grep -Ev "(New parser|Welder)" > $result
```

## Generate the comparison

```bash
python3 tests/benchmarks/compare.py tests/benchmarks/results/*.csv
```
5 changes: 5 additions & 0 deletions tests/benchmarks/results/5-ee9ff764.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name,iterations,real_time,cpu_time,time_unit,bytes_per_second,items_per_second,label,error_occurred,error_message
"quicksort",4601,0.150416,0.150228,ms,,,,,
"ackermann/iterations:50",50,59.9067,59.8294,ms,,,,,
"fibonacci/iterations:100",100,6.27221,6.26509,ms,,,,,
"man_or_boy",45605,0.0153367,0.015325,ms,,,,,

0 comments on commit ee87cf3

Please sign in to comment.