flamegraph

Fork of flamegraph without J***S*****.
git clone git://git.laack.co/flamegraph.git
Log | Files | Refs | README

commit c353d1aaebdcea5137c17254195616c9864d04cc
parent 45b2761073bc6456dbe50c94c19652b2a6e9aafa
Author: Brendan Gregg <brendan.d.gregg@gmail.com>
Date:   Wed,  8 Nov 2023 07:58:50 +1100

Merge pull request #322 from matthew-olson-intel/perlfaq_link

Adding perlfaq link
Diffstat:
Mflamegraph.pl | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/flamegraph.pl b/flamegraph.pl @@ -1225,8 +1225,10 @@ while (my ($id, $node) = each %Node) { $y2 = $ypad1 + ($depth + 1) * $frameheight - $framepad; } + # Add commas per perlfaq5: + # https://perldoc.perl.org/perlfaq5#How-can-I-output-my-numbers-with-commas-added? my $samples = sprintf "%.0f", ($etime - $stime) * $factor; - (my $samples_txt = $samples) # add commas per perlfaq5 + (my $samples_txt = $samples) =~ s/(^[-+]?\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/$1,/g; my $info;