Skip to content

Instantly share code, notes, and snippets.

@Trass3r
Created October 16, 2022 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Trass3r/4f79721c247024a8b08289d82d8261b5 to your computer and use it in GitHub Desktop.
Save Trass3r/4f79721c247024a8b08289d82d8261b5 to your computer and use it in GitHub Desktop.
#! /bin/sh
awk -- '!/^#/ {
TIMES[$4] += ($2 - $1)/1000
COUNT[$4] += 1
}
END {
for (TGT in TIMES)
AVG[TGT]=TIMES[TGT]/COUNT[TGT]
asorti(AVG, SORTED, "@val_num_desc")
for (num in SORTED)
print AVG[SORTED[num]] " " SORTED[num]
}' .ninja_log | head -n 50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment