Is there a way to exclude packages from being profiled?

24 views
Skip to first unread message

jguluarte

unread,
Feb 7, 2011, 8:44:31 PM2/7/11
to Devel::NYTProf Dev
Hello,

I've looked through the documentation, and it seems that this package
is based on a few others. One of those is Devel::Profiler, and it has
a "bad_pkgs" that you can include that will cause it to ignore an
$array_ref list of packages from the profile output. I haven't seen
any way to invoke this through the current options, and wanted to see
if somebody else has already implemented in their own code or if it is
planned in a new release - or if it would be better to "hack" it in
myself.

- jguluarte

Tim Bunce

unread,
Apr 15, 2011, 4:59:00 AM4/15/11
to develnyt...@googlegroups.com

It's not implemented. Why do you think this feature would be useful?

Tim.

N Heinrichs

unread,
May 17, 2013, 3:06:32 AM5/17/13
to develnyt...@googlegroups.com
Quite an old topic, but one use case would be to prevent Catalyst/Moose/Class::MOP/etc. from cluttering flame graphs, "top 15 subs", etc.

I s'pose it's a modification to nytprofhtml as opposed to the actual profiler.

Tim Bunce

unread,
May 17, 2013, 3:17:27 PM5/17/13
to N Heinrichs, develnyt...@googlegroups.com
Meanwhile, it's pretty easy to create your own flame graph using "grep -v"
on the calls file to filter out packages you're not interested in.

It's basically

grep -v "Class::MOP" nytprof/all_stacks_by_time.calls | flamegraph.pl > test.svg

(though see nytprofhtml for details of extra args to scale values etc)

Tim.
> --
> --
> You've received this message because you are subscribed to
> the Devel::NYTProf Development User group.
>
> Group hosted at: [1]http://groups.google.com/group/develnytprof-dev
> Project hosted at: [2]http://perl-devel-nytprof.googlecode.com
> CPAN distribution: [3]http://search.cpan.org/dist/Devel-NYTProf
>
> To post, email: develnyt...@googlegroups.com
> To unsubscribe, email: develnytprof-d...@googlegroups.com
> ---
> You received this message because you are subscribed to the Google Groups "Devel::NYTProf Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> develnytprof-d...@googlegroups.com.
> For more options, visit [4]https://groups.google.com/groups/opt_out.
>
>
>
> References
>
> Visible links
> 1. http://groups.google.com/group/develnytprof-dev
> 2. http://perl-devel-nytprof.googlecode.com/
> 3. http://search.cpan.org/dist/Devel-NYTProf
> 4. https://groups.google.com/groups/opt_out
Reply all
Reply to author
Forward
0 new messages