Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove line number from stackcollapse-wcp output #331

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion stackcollapse-wcp.pl
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,19 @@
# CDDL HEADER END

use strict;
use Getopt::Long;

my $current = "";
my $start_processing = 0;
my $samples = 0;
my %stacks;

my $lines = 0;
GetOptions(
'lines|l' => \$lines,
);


while(<>) {
s/^\s+|\s+$//g;

Expand All @@ -49,7 +56,9 @@
# 99.791% ===================================== (17194 samples)
$samples = $1;
next;
} elsif (m/^\d+: (.*)$/) {
}

if (($lines && m/^\d+: (.*)$/) || (!$lines && m/^\d+: (.*) +\(at .*\)$/)) {
# 1: poll__YNjd8fE6xG8CRNwfLnrx0g_2 (at /mnt/sde1/storage/nim-beacon-chain-clean/vendor/nim-chronos/chronos/asyncloop.nim:343)
my $function = $1;
if ($current eq "") {
Expand Down