Skip to content

Commit

Permalink
Merge pull request #19 from timbunce/factor3
Browse files Browse the repository at this point in the history
Fix percentages when using --factor
  • Loading branch information
brendangregg committed Apr 9, 2013
2 parents f3c00c7 + d0dffb8 commit 0016550
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flamegraph.pl
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ sub flow {
if ($func eq "" and $depth == 0) {
$info = "all ($samples_txt $countname, 100%)";
} else {
my $pct = sprintf "%.2f", ((100 * $samples) / $timemax);
my $pct = sprintf "%.2f", ((100 * $samples) / ($timemax * $factor));
my $escaped_func = $func;
$escaped_func =~ s/&/&/g;
$escaped_func =~ s/</&lt;/g;
Expand Down

0 comments on commit 0016550

Please sign in to comment.