Skip to content

Commit

Permalink
add a more reliable profiler
Browse files Browse the repository at this point in the history
  • Loading branch information
chirag-parmar committed Jan 15, 2025
1 parent 599f89e commit 4fc0632
Show file tree
Hide file tree
Showing 5 changed files with 560 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ build/
*.exe
*.dll
*.generated.nim
nimble.paths
nimble.paths

#OS specific files
**/.DS_Store
2 changes: 2 additions & 0 deletions tests/rlp/profiler/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
!*.nim
!*.sh
25 changes: 25 additions & 0 deletions tests/rlp/profiler/build_profiler.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

objs=("tx" "header" "blk" "blk80" "blk320" "blk640" "blk1280")

for obj in "${objs[@]}"; do
nim compile --mm:orc -d:$obj -d:release --out:bench_"$obj"_default profiler.nim
nim compile --mm:orc -d:$obj -d:opt -d:release --out:bench_"$obj"_two_pass profiler.nim
nim compile --mm:orc -d:$obj -d:hash -d:release --out:bench_"$obj"_default_hash profiler.nim
nim compile --mm:orc -d:$obj -d:hash -d:opt -d:release --out:bench_"$obj"_hash_writer profiler.nim
nim compile --mm:refc -d:$obj -d:release --out:bench_"$obj"_default_refc profiler.nim
nim compile --mm:refc -d:$obj -d:opt -d:release --out:bench_"$obj"_two_pass_refc profiler.nim
nim compile --mm:refc -d:$obj -d:hash -d:release --out:bench_"$obj"_default_hash_refc profiler.nim
nim compile --mm:refc -d:$obj -d:hash -d:opt -d:release --out:bench_"$obj"_hash_writer_refc profiler.nim
done

for obj in "${objs[@]}"; do
source ./bench_"$obj"_default
source ./bench_"$obj"_two_pass
source ./bench_"$obj"_default_hash
source ./bench_"$obj"_hash_writer
source ./bench_"$obj"_default_refc
source ./bench_"$obj"_two_pass_refc
source ./bench_"$obj"_default_hash_refc
source ./bench_"$obj"_hash_writer_refc
done
Loading

0 comments on commit 4fc0632

Please sign in to comment.