Skip to content

Commit

Permalink
Fix percentages when using --factor
Browse files Browse the repository at this point in the history
  • Loading branch information
timbunce committed Apr 6, 2013
1 parent 4952f87 commit d0dffb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flamegraph.pl
Expand Up @@ -325,7 +325,7 @@ sub flow {
if ($func eq "" and $depth == 0) { if ($func eq "" and $depth == 0) {
$info = "all ($samples_txt $countname, 100%)"; $info = "all ($samples_txt $countname, 100%)";
} else { } else {
my $pct = sprintf "%.2f", ((100 * $samples) / $timemax); my $pct = sprintf "%.2f", ((100 * $samples) / ($timemax * $factor));
my $escaped_func = $func; my $escaped_func = $func;
$escaped_func =~ s/&/&/g; $escaped_func =~ s/&/&/g;
$escaped_func =~ s/</&lt;/g; $escaped_func =~ s/</&lt;/g;
Expand Down

0 comments on commit d0dffb8

Please sign in to comment.