ninja_profile: add ninja profile analysis script

This commit is contained in:
Danny Robson 2021-05-26 12:49:08 +10:00
parent 5552af23b9
commit c2665a3d60

14
ninja_profile.awk Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/awk -f
!/^#/ {
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]
}