Skip to content

Commit

Permalink
Merge pull request snabbco#149 from lukego/benchmarks-fix-awk
Browse files Browse the repository at this point in the history
testsuite/bench: Fix awk parsing of perf output
  • Loading branch information
lukego committed Jan 2, 2018
2 parents 02d596c + f66fc04 commit b53a438
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 b53a438

Please sign in to comment.