script to get each timing - usage bin/getTestRunnerTimings.sh

mochawesome
John McLear 2021-01-26 13:48:12 +00:00
parent 697bfd979b
commit 6a93c66de4
1 changed files with 2 additions and 0 deletions

2
bin/getTestRunnerTimings.sh Executable file
View File

@ -0,0 +1,2 @@
# Requires gron
for file in src/mochawesome-report/mochawesome*.json; do gron $file; done | grep -F 'results[' | grep -F 'tests[' | grep -E '(fullTitle|duration)' | sed -r 's/.*= //' | sed -r 's/[;"]//g' | paste -d '$' - - | awk -F'$' '{if ($1 > durations[$2]) durations[$2] = $1} END{for (i in durations) print durations[i], i}' | sed 's/^[^0-9].*/0 \0/'