Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Dreaming of a Better Profiler

by andyf (Pilgrim)
on May 26, 2004 at 23:18 UTC ( #356753=note: print w/replies, xml ) Need Help??

in reply to Dreaming of a Better Profiler

To add a little to what Adrian says, periodicity could be a problem. Many code segments exhibit very periodic behaviour.
As in all sampling Nyquist says that close to the point where the sampling rate and half the execution rate coincide you will get an error, or alias given by the difference of the two. If any two metrics you are measuring are opposite in magnitude on opposite sampling cycles you will get a zero average and completely lose the magnitude. I know we don't get negative memory usage etc, but the point is illustrated. Since the profiler is running at a fraction of the execution frequency the results may vary wildly between runs.
Introducing a random time offset to every sample will give you the effect similar to dithering, which actually increases the accuracy given a few runs to average over.
Sounds like a useful tool, good work.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2021-10-21 18:53 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (83 votes). Check out past polls.