Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

NYTProf missing dot files

by Anonymous Monk
on May 20, 2024 at 17:01 UTC ( [id://11159564]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Devel::NYTProf only generates two graphviz dot files, linked from the main profile page. Each sub page in the profile has a link to "Call graph for these subroutines as a Graphviz dot language file" but the files don't exist. Does anyone know why these links are broken and how to enable them? Thank you

Replies are listed 'Best First'.
Re: NYTProf missing dot files
by choroba (Cardinal) on May 21, 2024 at 09:26 UTC
    I can confirm the files are not being created. Have you ever seen them in older versions of Devel::NYTProf? The best thing would be to raise a new issue at GitHub.

    Update: I've found the files in a project I haven't touched since 2012. I was using Perl 5.14.2 at that time.

    Update 2: It seems that negating this condition makes the dot files appear.

    our %dot_file_generated; if (! $dot_file_generated{$dot_file}++) { # just once for +line/block/sub # ~

    Update 3: Reported.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
      Wow that was an easy fix! Thank you for spending the time to find it choroba. For anyone who does not know, these files are used to generate lovely images of subroutine calls. Installing graphviz gives you a bunch of binaries to generate different kinds of graphs like:
      neato -Tpng /path/to/nytprof/PerlModule-pm.dot -o some.png
      Layout engines include: dot, neato, fdp, sfdp, circo, twopi, osage, patchwork

      > Have you ever seen them in older versions of Devel::NYTProf?

      I do not recall ever seeing them, but only recently began to check :-)

      The NYTProf graphs are intense but callGraph is more pretty and easier to grok: github.com/koknat/callGraph

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11159564]
Approved by marto
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-06-17 19:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.