Skip to content

Instantly share code, notes, and snippets.

@cosmin
Created February 11, 2010 21:02
Show Gist options
  • Save cosmin/301950 to your computer and use it in GitHub Desktop.
Save cosmin/301950 to your computer and use it in GitHub Desktop.
find . -name '*.txt' | grep surefire | xargs grep "Time elapsed: $REGEX" | sed -e 's%^./\([^/]*\)/target/surefire-reports/%\1 => %' -e 's/.txt://' -e 's/\(.*\)Tests run.*Time elapsed:\(.*\)/\2 => \1/' | sort -r | awk '{sum+= $1 } {if ($1 >= 1) slow+= $1} {if ($1 >= 1) print $0} END {print "\nTotal time in slow tests = " slow " sec"} END {print "Total time in all tests = " sum " sec"} END {print "Ratio = " slow/sum};'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment