Revision: 1367
Author: [email protected]
Date: Fri Sep 24 07:28:35 2010
Log: Clarified usecputime=1 docs
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1367
Modified:
/trunk/Changes
/trunk/lib/Devel/NYTProf.pm
=======================================
--- /trunk/Changes Fri Sep 24 03:28:23 2010
+++ /trunk/Changes Fri Sep 24 07:28:35 2010
@@ -9,6 +9,7 @@
=head2 Changes in Devel::NYTProf 4.06 (svn XXX) XXX
Added note to the docs re profiling applications that use Coro.
+ Clarified usecputime=1 docs.
=head2 Changes in Devel::NYTProf 4.05 (svn 1359) 15th Sept 2010
=======================================
--- /trunk/lib/Devel/NYTProf.pm Fri Sep 24 03:28:23 2010
+++ /trunk/lib/Devel/NYTProf.pm Fri Sep 24 07:28:35 2010
@@ -445,19 +445,21 @@
=head2 usecputime=1
Measure user CPU + system CPU time instead of the real elapsed 'wall clock'
-time (which is the default).
+time (which is the default). But there are better ways to do this, read on.
Measuring CPU time has the advantage of making the measurements
independent of
-time spent blocked waiting for the cpu or network i/o etc. But it also has
the
-severe disadvantage of having typically I<far> less accurate timings.
-
-Most systems use a 0.01 second granularity. With modern processors having
multi-
-gigahertz clocks, 0.01 seconds is like a lifetime. The cpu time
clock 'ticks'
+time spent blocked waiting for the cpu or network i/o etc. But the method
used
+by Cusecputime=1> also has the severe disadvantage of having typically
I<far>
+less accurate timings.
+
+Most systems have a 0.01 second granularity in the results from the
C<times()>
+sytem call. With modern processors having multi- gigahertz clocks, 0.01
+seconds is like a lifetime. The 'ticks' of this CPU time clock
happen so rarely relative to the activity of a most applications that you'd
have to run the code for many hours to have any hope of reasonably useful
results.
-A better alternative would be to use the C<clock=N> option to select a
-high-resolution cpu time clock, if available on your system, because
that'll
+A much better alternative is to use the L</clock=N> option to select a
+high-resolution CPU time clock, if available on your system, because
that'll
give you higher resolution and work for the subroutine profiler as well.
=head2 file=...
--
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]