Skip to content
Browse files

Fix percentages when using --factor

  • Loading branch information...
1 parent 4952f87 commit d0dffb81f8f560f1af2701499afdb58b1e88c997 @timbunce committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 flamegraph.pl
View
2 flamegraph.pl
@@ -325,7 +325,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 d0dffb8

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