Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've written an extension to RequestTracker for a client, but he says the performance isn't good enough. I'd like to do some profiling, but I'm not sure how to connect up a profiler (say NYTProf, for example)? I tried what the man page says and put PerlModule Devel::NYTProf::Apache in my apache config, but all I get in the results are Apache2:XSLoader, Devel::NYTProf::Apache and ModPerl::Util modules in the results, and neither my own nor RT's modules.

share|improve this question
Hi @Paul. This is a case where, in general, my favorite method only takes you part way, because you need visibility into round-trips between server and client, although here's a case where it was effective, even with a protocol in the middle. – Mike Dunlavey Feb 2 at 23:39
Not just server and client, but also between apache, the fast cgi server and PostgreSQL. Good luck trying to debug that with control c. Fortunately, the method I mentioned in my answer showed me that Dbd::pg::execute was the biggest time consumer, and pgfountaine showed me the queries that needed to be improved. – Paul Tomblin Feb 3 at 0:46
1  
You're right. 20 years ago I worked on a factory-floor system with multiple machines TTY-ing each other. It wasn't easy, but I managed to get time-stamped logs, from which I could trace the history of individual message flows across machines/processes. It wasn't fun, but I did manage to dig out some tumors. Glad you found something that works. – Mike Dunlavey Feb 3 at 1:34

1 Answer

I don't much like it, but I ended up profiling it use the stand-alone version, with perl -d:NYTProf /opt/rt4/sbin/standalone_http

I'm leaving this open in case somebody comes up with a better solution.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.