diff --git a/README.md b/README.md index 5db92e6..79b7d15 100644 --- a/README.md +++ b/README.md @@ -488,7 +488,7 @@ to focus on rerunning failing items only. If you wish to compare two CSV reports non-interactively, here is a handy `awk` incantation: ```sh -awk 'BEGIN{FS=",";OFS=",";print "Name,Old,New,Ratio"}FNR==1{trueNF=NF;next}NF0)print "Geometric mean,,",exp(gs/gc)}' old.csv new.csv +awk 'BEGIN{FS=",";OFS=",";print "Name,Old,New,Ratio"}FNR==1{trueNF=NF;next}NF0)print "Geometric mean,,",exp(gs/gc)}' old.csv new.csv ``` A larger shell snippet to compare two `git` commits can be found in `compare_benches.sh`. diff --git a/compare_benches.sh b/compare_benches.sh index a6171f7..bdd4f53 100755 --- a/compare_benches.sh +++ b/compare_benches.sh @@ -25,7 +25,7 @@ compare_benches () { cabal run -v0 benchmarks -- --baseline "$OLDCSV" --csv "$NEWCSV" "$@" && \ git checkout -q "@{-2}" && \ - awk 'BEGIN{FS=",";OFS=",";print "Name,'"$OLD"','"$NEW"',Ratio"}FNR==1{trueNF=NF;next}NF0)print "Geometric mean,,",exp(gs/gc)}' "$OLDCSV" "$NEWCSV" > "$OLDVSNEWCSV" && \ + awk 'BEGIN{FS=",";OFS=",";print "Name,'"$OLD"','"$NEW"',Ratio"}FNR==1{trueNF=NF;next}NF0)print "Geometric mean,,",exp(gs/gc)}' "$OLDCSV" "$NEWCSV" > "$OLDVSNEWCSV" && \ trap - INT } diff --git a/src/Test/Tasty/Bench.hs b/src/Test/Tasty/Bench.hs index b2d9868..1c850b1 100644 --- a/src/Test/Tasty/Bench.hs +++ b/src/Test/Tasty/Bench.hs @@ -451,7 +451,7 @@ package to focus on rerunning failing items only. If you wish to compare two CSV reports non-interactively, here is a handy @awk@ incantation: -> awk 'BEGIN{FS=",";OFS=",";print "Name,Old,New,Ratio"}FNR==1{trueNF=NF;next}NF0)print "Geometric mean,,",exp(gs/gc)}' old.csv new.csv +> awk 'BEGIN{FS=",";OFS=",";print "Name,Old,New,Ratio"}FNR==1{trueNF=NF;next}NF0)print "Geometric mean,,",exp(gs/gc)}' old.csv new.csv A larger shell snippet to compare two @git@ commits can be found in @compare_benches.sh@.