Skip to content
Browse files

Merge pull request #19 from timbunce/factor3

Fix percentages when using --factor
  • Loading branch information...
2 parents f3c00c7 + d0dffb8 commit 0016550c3046bd1bf5057ad3c1070ae2210fecb1 @brendangregg committed Apr 9, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 flamegraph.pl
View
2 flamegraph.pl
@@ -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;

0 comments on commit 0016550

Please sign in to comment.
Something went wrong with that request. Please try again.