sub report {
my $self = shift;
- # close any remaining open nodes
- map { $self->profile(end => $_->getNodeValue->{action}) }
- (reverse @{ $self->stack })[1 .. $#{$self->stack}];
-
my $t = Text::SimpleTable->new( [ 62, 'Action' ], [ 9, 'Time' ] );
my @results;
$self->tree->traverse(
$stats->profile(comment => "interleave 2");
push(@expected, [ 4, "- interleave 2", 0.2, 0 ]);
+ $fudge_t[1] = 550000;
+ $stats->profile(begin => "begin with no end");
+ push(@expected, [ 4, "begin with no end", 0.05, 1 ]);
+
$fudge_t[1] = 600000; # end badly nested block time
$stats->profile(end => "badly nested block 1");
my @report = $stats->report;
is_deeply(\@report, \@expected, "report");
+ # print scalar($stats->report);
+
is ($stats->elapsed, 14, "elapsed");
}