Skip to content

Commit

Permalink
testsuite/bench: Fix awk parsing of perf output
Browse files Browse the repository at this point in the history
The awk code for extracting the instructions and cycles counts from
the perf output was not working. Likely I had updated perf to an
incompatible version and pushed that without testing. Naughty me.
  • Loading branch information
lukego committed Jan 1, 2018
1 parent 02d596c commit f66fc04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testsuite/bench/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ let benchmark = letter: name: src: args: run:
for result in result/*.perf; do
version=${name}
benchmark=$(basename -s.perf -a $result)
instructions=$(awk -F, -e '$3 == "instructions" { print $1; }' $result)
cycles=$( awk -F, -e '$3 == "cycles" { print $1; }' $result)
instructions=$(awk -F, -e '$3 ~ "^instructions" { print $1; }' $result)
cycles=$( awk -F, -e '$3 ~ "^cycles" { print $1; }' $result)
echo ${letter},$version,$benchmark,${toString run},$instructions,$cycles >> $out/bench.csv
done
'';
Expand Down

0 comments on commit f66fc04

Please sign in to comment.