3# Breaks down compilation time and memory usage by module.
4# To use this script, do
7# stack build --ghc-options='-dshow-passes' 2>output.txt
8# perl parseTimings.pl output.txt
11 if (/!!! (.*) \[(.*)\]: finished in (.*) milliseconds, allocated (.*) megabytes/) {
16 if (!$timings{$module}) {
17 $timings{$module} = {'milliseconds' => 0, 'megabytes' => 0};
19 $timings{$module}{'milliseconds'} += $milliseconds;
20 $timings{$module}{'megabytes'} += $megabytes;
23 printf("%10s %10s %s\n", "Time (ms)", "Alloc (Mb)", "LOC", "Module");
27 $path = "src/$path.hs";
28 $loc = `wc -l $path 2>/dev/null`;
30 $loc =~ s/^\s*(\d+).*/\1/;
31 printf("%10d %10d %6d %s\n", $timings{$_}{'milliseconds'}, $timings{$_}{'megabytes'}, $loc, $_);
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list