Admin/profiling_report
author blanchet
Fri, 30 Apr 2010 13:58:35 +0200
changeset 36570 9bebcb40599f
parent 17001 51ff2bc32774
child 36859 51af1657263b
permissions -rwxr-xr-x
identify axioms/conjectures more reliably in ATP proofs (an empty dependency list doesn't always indicate an axiom or conjecture!)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16671
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
     1
#!/usr/bin/env perl
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
     2
#
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
     3
# $Id$
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
     4
# Author: Makarius
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
     5
#
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
     6
# DESCRIPTION: Simple report generator for Poly/ML profiling output.
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
     7
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
     8
use strict;
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
     9
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    10
my %log = ();
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    11
my @output = ();
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    12
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    13
while (<ARGV>) {
16693
75f39d66425d fixed regexp grouping;
wenzelm
parents: 16671
diff changeset
    14
    if (m,^([ 0-9]{10}) (\S+$|GARBAGE COLLECTION.*$),) {
16671
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    15
	my $count = $1;
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    16
	my $fun = $2;
16705
wenzelm
parents: 16693
diff changeset
    17
	$fun =~ s,-?\(\d+\).*$,,g;
wenzelm
parents: 16693
diff changeset
    18
	$fun =~ s,/\d+$,,g;
16671
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    19
	if ($count =~ m,^\s*(\d)+$,) {
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    20
	    if (defined($log{$fun})) {
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    21
		$log{$fun} += $count;
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    22
	    } else {
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    23
		$log{$fun} = $count;
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    24
	    }
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    25
	}
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    26
    }
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    27
}
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    28
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    29
foreach my $fun (keys %log) {
17001
wenzelm
parents: 16858
diff changeset
    30
    push @output, (sprintf "%14u %s\n", $log{$fun}, $fun);
16671
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    31
}
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    32
ca316edcb031 Simple report generator for Poly/ML profiling output.
wenzelm
parents:
diff changeset
    33
print (sort @output);