Skip to content

Instantly share code, notes, and snippets.

@UnkindPartition
UnkindPartition / gist:1392285
Created November 24, 2011 21:04
Filtering GHC profile with awk
# Show the cost-centres with at least 2% accumulated time
% awk '$7 > 2' benchmark.prof
Thu Nov 24 22:56 2011 Time and Allocation Profiling Report (Final)
total time = 9.24 secs (462 ticks @ 20 ms)
total alloc = 6,124,320,224 bytes (excludes profiling overheads)
MAIN MAIN 1 0 0.0 0.0 100.0 100.0
main Main 322 1 0.0 0.0 100.0 100.0
=~ Text.Regex.Applicative.Interface 323 1 0.0 0.0 100.0 100.0
match Text.Regex.Applicative.Interface 324 1 0.0 0.0 100.0 100.0
step Text.Regex.Applicative.Object 339 800 9.5 4.2 52.4 9.2