xref: /glogg/tools/perfmeter.pl (revision 257f352a1bd6a2232d33f54ca8a8f0a64da3e439)
1#!/usr/bin/perl
2
3# Take a debug log from logcrawler and output some perf statistics
4
5while (<>) {
6    strip;
7    if (/(\d\d\.\d\d\d) DEBUG: paintEvent.*firstLine=(\d+) lastLine=(\d+) /) {
8        if ( ($3 - $2) > 35 ) {
9            $beginning = $1;
10            $first_line = $2;
11        }
12    }
13    elsif (/(\d\d\.\d\d\d) DEBUG: End/) {
14        if ($beginning) {
15            $time = $1 - $beginning;
16            print "Line $first_line, Time: $time\n";
17        }
18    }
19}
20