Advertisement
bytecoded

Top Calls by Average Memory

Mar 23rd, 2019
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.33 KB | None | 0 0
  1. cat rphost*/*.log | grep -P ',CALL,.+,Context=' | sed -r 's/\xef\xbb\xbf//g; s/^.+,Context=//g; s/,MemoryPeak=.+$//g' | gawk -F',Memory=' '{{Memory[$1]+=$2; Executions[$1]+=1}} END {for (Context in Memory) printf "%.3f %s\n", Memory[Context] / Executions[Context], Context}' | sort -rnb | head -n 1000 > top-calls-by-average-memory.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement