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

Re^3: Troubles with getting NYTProf to work properly in a CGI program

by Anonymous Monk
on Feb 22, 2013 at 03:09 UTC ( #1020058=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Troubles with getting NYTProf to work properly in a CGI program
in thread Troubles with getting NYTProf to work properly in a CGI program

Thus, the problem remains as to how to use slowops, and some of the other items I see in the documentation for NYTProf.

They're documented under http://search.cpan.org/~timb/Devel-NYTProf-4.25/lib/Devel/NYTProf.pm#NYTPROF_ENVIRONMENT_VARIABLE, so like the example

export NYTPROF=trace=2:start=init:file=/tmp/nytprof.out

To see how ENV{NYTPROF} parses try http://cpansearch.perl.org/src/TIMB/Devel-NYTProf-4.25/lib/Devel/NYTProf/Core.pm

if (my $NYTPROF = $ENV{NYTPROF}) { for my $optval ( $NYTPROF =~ /((?:[^\\:]+|\\.)+)/g) { my ($opt, $val) = $optval =~ /^((?:[^\\=]+|\\.)+)=((?:[^\\=]+| +\\.)+)\z/; s/\\(.)/$1/g for $opt, $val;


Comment on Re^3: Troubles with getting NYTProf to work properly in a CGI program
Select or Download Code
Re^4: Troubles with getting NYTProf to work properly in a CGI program
by ted.byers (Scribe) on Feb 22, 2013 at 04:44 UTC

    That's what I'd missed.

    It ignores the path for the output file I'd specified, but that's OK, as I found it anyway.

    Thanks

    Ted

      Well :) you used the delimiter character : without escaping it, as part of the filename

      I imagine  file=C\:/....../ would work

      And while escaping might work, I think it is a bit of a bug (at least a documentation bug)

      OTOH, if it accepted something standard like JSON the parsing is greatly simplified

      export NYTPROF='{"start":"init","file":"C:/..."}'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1020058]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2014-10-22 16:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (119 votes), past polls