Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^13: "Automated" benchmarking

by BrowserUk (Pope)
on Jan 25, 2012 at 17:04 UTC ( #949931=note: print w/ replies, xml ) Need Help??


in reply to Re^12: "Automated" benchmarking
in thread "Automated" benchmarking

both Devel::SmallProf and Devel::NYTProf are not counting lines but "sentences" executed

Okay. I guess have to take that as read.

I'm still intrigued by the extra 3 'sentences' for the sleep in aaa() though?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?


Comment on Re^13: "Automated" benchmarking
Re^14: "Automated" benchmarking
by salva (Monsignor) on Jan 25, 2012 at 17:40 UTC
    From perldebguts:

    When the execution of your program reaches a point that can hold a breakpoint, the "DB::DB()" subroutine is called if any of the variables $DB::trace, $DB::single, or $DB::signal is true.

    And that's what Devel::SmallProf and Devel::NYTProf are counting, calls to DB::DB().

      I wasn't doubting you. Just still puzzling how a subroutine that is called 5000 times can result in 5003 sentences?

      In the other cases, it is fairly easy to see how xxx() for ... ; could result in double the number of sentence as there are lines.

      But those odd 3 are just beyond my ability to reason.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      The start of some sanity?

        With perl 5.8.9 on Linux, replacing the calls to Win32::Sleep by calls to Time::HiRes::nanosleep, I get the expected count of 5000.

        Probably, that 3 extra sentences are from some callback run from Win32::Sleep the first time it is called. Maybe you could use Devel::Trace or single step through the debugger to see what's going on.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2014-09-20 16:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (160 votes), past polls