devel-nytprof

Profiling a Perl CGI script that times-out

五迷三道 提交于 2019-12-22 05:33:38
问题 I have a Perl CGI application that sometimes times out, causing it to be killed by Apache and 504 Gateway Time-out error to be sent to browser. I am trying to profile this application using NYTProf, however I cannot read profile data: $ nytprofhtml -f www/cgi-local/nytprof.out Reading www/cgi-local/nytprof.out Profile data incomplete, inflate error -5 ((null)) at end of input file, perhaps the process didn't exit cleanly or the file has been truncated (refer to TROUBLESHOOTING in the

Why does Perl compile diagnostics.pm if I have no diagnostics in my code?

99封情书 提交于 2019-12-05 11:58:18
问题 When I was looking at the output of Devel::NYTProf v4 for a CGI program, I came across the diagnostics.pm in the report Source Code Files — ordered by exclusive time then name . First I didn't understand why that would be in the production code. I dug deeper through the report and found out that it was called by main::BEGIN@17 . That, in turn, is the following line: # spent 34µs (26+8) within main::BEGIN@15 which was called: # once (26µs+8µs) by main::RUNTIME at line 15 use strict; # spent

Profiling a Perl CGI script that times-out

一笑奈何 提交于 2019-12-05 05:58:15
I have a Perl CGI application that sometimes times out, causing it to be killed by Apache and 504 Gateway Time-out error to be sent to browser. I am trying to profile this application using NYTProf, however I cannot read profile data: $ nytprofhtml -f www/cgi-local/nytprof.out Reading www/cgi-local/nytprof.out Profile data incomplete, inflate error -5 ((null)) at end of input file, perhaps the process didn't exit cleanly or the file has been truncated (refer to TROUBLESHOOTING in the documentation) I am using sigexit=1 NYTProf option. Here's minimal CGI script that reproduces problem: #!/usr

Why does Perl compile diagnostics.pm if I have no diagnostics in my code?

南笙酒味 提交于 2019-12-03 22:13:37
When I was looking at the output of Devel::NYTProf v4 for a CGI program , I came across the diagnostics.pm in the report Source Code Files — ordered by exclusive time then name . First I didn't understand why that would be in the production code. I dug deeper through the report and found out that it was called by main::BEGIN@17 . That, in turn, is the following line: # spent 34µs (26+8) within main::BEGIN@15 which was called: # once (26µs+8µs) by main::RUNTIME at line 15 use strict; # spent 34µs making 1 call to main::BEGIN@15 # spent 8µs making 1 call to strict::import # spent 36µs (17+19)