On Fri, Oct 09, 2009 at 05:09:37AM -0700, bohica wrote: > > This is a little strange. I am starting to think D::N is slowing the > code down so it spends less time waiting for data on the socket i.e., > at the moment as soon as a client connects it is accepted and then it > does a read on the socket and without D::N I think it is getting to > the read faster and hence spending more time blocking. > > I can no longer reproduce the result I first posted :-( - I need to > unwind a lot of changes to get back to where I was - perhaps I made a > mistake but: > > For B::T, D::N and DashProfiler all running together I get: > > GET REQUEST,601 trials of GET REQUEST (4.330s total), 7.204ms/trial > auto > queued.pl > _get_request: dur=4.511748 count=601 (max=0.417300 > avg=0.007507) > # spent 4.12s (190ms+3.93) within main::_get_request which was called > 601 times, avg 6.85ms/call: # 601 times (190ms+3.93s) at line 1278, > avg 6.85ms/call > > For B::T and DashProfiler running the same test case: > > GET REQUEST,601 trials of GET REQUEST (15.799s total), 26.289ms/trial > auto > queued.pl > _get_request: dur=15.843982 count=601 (max=1.043370 > avg=0.026363)
Interesting. > I think this is perhaps evidence of D:N slowing things down so less > time is spent waiting on the socket? Possibly. Is the overall time for the request about the same? (As measured by a higher-level sub that returns only when the request is complete, for example.) You could try turning off statement profiling (stmts=0). That would significantly reduce the performance impact of NYTProf. > This also brings to mind something I meant to mention before now > (although I'm sure you are aware of it). Some of the daemons being > profiled call things like select() or wait_any (in oracle this blocks > until an alert is received) - these always come out top as they spend > most of their time waiting for something to happen. Do these subs > which wait skew the stats at all? I'm not sure what you mean by skew. I presume you're measuring realtime not cpu time, so naturally time spent anywhere gets counted. Tim. p.s. I'd be grateful if you could add reviews on http://cpanratings.perl.org/ for both DashProfiler and B::T, that compare and contrast them. It would be helpful to people looking at one to be aware of the other. (Feel free to review NYTProf while you're there :) --~--~---------~--~----~------------~-------~--~----~ You've received this message because you are subscribed to the Devel::NYTProf Development User group. Group hosted at: http://groups.google.com/group/develnytprof-dev Project hosted at: http://perl-devel-nytprof.googlecode.com CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf To post, email: [email protected] To unsubscribe, email: [email protected] -~----------~----~----~----~------~----~------~--~---
