Commit 8a76a663 authored by kglynn's avatar kglynn
Browse files

[project @ 1999-11-09 00:14:50 by kglynn]

Support for negative timings in the stats file.  (I've seen times of -0.00).
If a timing is negative then set it to 0.
parent 03434db2
......@@ -400,11 +400,11 @@ sub process_stats_file {
$TotMem = $1;
}
if ( /^\s*INIT\s+time\s*(\d+\.\d\d)s\s*\(\s*(\d+\.\d\d)s elapsed\)/ ) {
if ( /^\s*INIT\s+time\s*(-*\d+\.\d\d)s\s*\(\s*(-*\d+\.\d\d)s elapsed\)/ ) {
$InitTime = $1; $InitElapsed = $2;
} elsif ( /^\s*MUT\s+time\s*(\d+\.\d\d)s\s*\(\s*(\d+\.\d\d)s elapsed\)/ ) {
} elsif ( /^\s*MUT\s+time\s*(-*\d+\.\d\d)s\s*\(\s*(-*\d+\.\d\d)s elapsed\)/ ) {
$MutTime = $1; $MutElapsed = $2;
} elsif ( /^\s*GC\s+time\s*(\d+\.\d\d)s\s*\(\s*(\d+\.\d\d)s elapsed\)/ ) {
} elsif ( /^\s*GC\s+time\s*(-*\d+\.\d\d)s\s*\(\s*(-*\d+\.\d\d)s elapsed\)/ ) {
$GcTime = $1; $GcElapsed = $2;
}
}
......@@ -467,6 +467,15 @@ sub process_stats_file {
$MutElapsed =~ s/,//g;
$GcTime =~ s/,//g;
$GcElapsed =~ s/,//g;
# if timings are negative (I've seen -0.00s) then set to 0
$InitTime = 0 unless $InitTime >= 0;
$InitElapsed = 0 unless $InitElapsed >= 0;
$MutTime = 0 unless $MutTime >= 0;
$MutElapsed = 0 unless $MutElapsed >= 0;
$GcTime = 0 unless $GcTime >= 0;
$GcElapsed = 0 unless $GcElapsed >= 0;
}
sub process_spixstats_files { # 2 of them; one for mutator, one for GC
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment