Skip to content

Commit fae165d

Browse files
committed
make valgrind call smaller
1 parent fae1db6 commit fae165d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

justfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ measure what: (_check "bc hyperfine max_rss jq sponge")
100100
max_rss -ro STATS -- $(cat CMD)
101101
jq '. += {"max_rss": '$(cat STATS)'}' "$out" | sponge "$out"
102102

103-
valgrind --tool=callgrind --callgrind-out-file=callgrind.txt $(cat CMD)
103+
cycle_cmd="$(cat CMD)"
104+
cycle_cmd="${cycle_cmd/{{i}}/100000}"
105+
valgrind --tool=callgrind --callgrind-out-file=callgrind.txt $cycle_cmd
104106
grep "summary:" callgrind.txt | awk '{print $2}' > CYCLES
105107
jq '. += {"cycles": '$(cat CYCLES)'}' "$out" | sponge "$out"
106108

scripts/summary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ ${markdownTable(
121121
)}
122122
123123
Note that cycles are counted with valgrind (using callgrind) and are only estimates of the actual CPU cycles used.
124-
124+
Called with \`100000\` as input.
125125
126126
${markdownTable(
127127
[

0 commit comments

Comments
 (0)