1 # Post processor for timeline output
2 # Does a diff betn consecutive timeline outputs looking for
5 my $percent = 1; # anything over 1% of total is of interest to us
6 my $ignoreDllLoads = 0; # by default don't ignore dll timings
8 # Read in log to memory
12 # Look for main1's timing
14 if (/^([0-9\.]*): \.\.\.main1/) {
16 print "Found main1 time: $total\n";
23 my $t = $total * $percent / 100;
27 printdiff
($cur, $prev, $_);
28 if (/total: ([0-9\.]*)/) {
29 # print how much % this was
30 printf "%4.2f%%", $1/$total*100;
41 my $diff = $cur - $prev;
43 # Make sure we have a considerable difference
48 # If we are ignoring dlls and this is a dll line, return
49 if ($ignoreDllLoads && $line =~ /PR_LoadLibrary/) {
53 # if significant time elapsed print it
54 printf "%4.2f%% %5.3f\n", $diff/$total*100, $diff;