justfile (626B) - raw


      1 build:
      2     werk build --jobs=1 -Dprofile=release
      3 
      4 run problem *args="":
      5     werk build --jobs=1 -Dprofile=release && time -pq ./target/bin/{{problem}} {{args}}
      6 
      7 bench problem *args="":
      8     just build {{problem}} -O5 && \
      9     poop "./{{problem}} {{args}}"
     10 
     11 # can inspect results with `perf report`
     12 # sudo sysctl kernel.perf_event_paranoid=1
     13 # sudo sysctl kernel.kptr_restrict=0
     14 perf bin *args="":
     15     perf record --call-graph dwarf ./{{bin}} {{args}} > /dev/null
     16 
     17 # stackcollapse-perf.pl and flamegraph.pl symlinked into path from flamegraph repo
     18 flamegraph:
     19     perf script | stackcollapse-perf.pl | flamegraph.pl > perf.svg
     20