Devel::NYTProf is a powerful feature-rich source code profiler for Perl. (Mostly in maintenance mode, so PRs are much more likely to be acted upon than Issues.)
Recently I started to expand integration tests for my Perl plugin for IntelliJ IDEA and found out that for some reason profiler produces unstable results in different runs. Ubuntu and Windows are fine.
perl-5.36.0
latest NytProf
Here is my test script:
sub something {
my $scalar = 1;
if ($scalar > 2) {
print "false";
}
elsif ($scalar < 2) {
print 'true';
}
print 'done';
}
BEGIN{
print 'begin block';
}
print 42;
something();
END{
print 'this is the end';
}
And here are 2 different runs stmts=0:calls=2:savesrc=0:slowops=1:sigexit=1:addpid=1:start=init:
And here are 2 different runs stmts=0:calls=2:savesrc=0:slowops=1:sigexit=1:addpid=1:start=begin:
Recently I started to expand integration tests for my Perl plugin for IntelliJ IDEA and found out that for some reason profiler produces unstable results in different runs. Ubuntu and Windows are fine.
Here is my test script:
And here are 2 different runs
stmts=0:calls=2:savesrc=0:slowops=1:sigexit=1:addpid=1:start=init
:And here are 2 different runs
stmts=0:calls=2:savesrc=0:slowops=1:sigexit=1:addpid=1:start=begin
:Cross-reference: Camelcade/Perl5-IDEA#2609