Revision: 1008
Author: tim.bunce
Date: Mon Jan  4 13:42:33 2010
Log: Include more %Config details in t/00-load.t output
(re  
http://www.nntp.perl.org/group/perl.cpan.testers/2009/12/msg6603296.html)
Updated NYTProf docs to include a note about timing on Windows.

http://code.google.com/p/perl-devel-nytprof/source/detail?r=1008

Modified:
  /trunk/Changes
  /trunk/lib/Devel/NYTProf/Data.pm
  /trunk/lib/Devel/NYTProf.pm
  /trunk/t/00-load.t

=======================================
--- /trunk/Changes      Mon Jan  4 12:33:17 2010
+++ /trunk/Changes      Mon Jan  4 13:42:33 2010
@@ -13,6 +13,11 @@
  add "calls N subs" to treemap mouseover box
  string eval merging - must allow at least viewing of source for called  
subs defined in a nested eval

+=head2 Changes in Devel::NYTProf 3.02
+
+  Updated NYTProf docs to include a note about timing on Windows.
+  Changed some tests to be more informative on failure.
+
  =head2 Changes in Devel::NYTProf 3.01 (svn r1005) 28th Dec 2009

    Fixed (removed) use of vfscanf() which broke on Windows.
=======================================
--- /trunk/lib/Devel/NYTProf/Data.pm    Mon Jan  4 12:33:17 2010
+++ /trunk/lib/Devel/NYTProf/Data.pm    Mon Jan  4 13:42:33 2010
@@ -516,7 +516,7 @@
          }
      }

-    # zero sub into and sub caller times
+    # zero sub info and sub caller times
      $_->normalize_for_test for values %{ $self->{sub_subinfo} };
      $_->normalize_for_test for $self->all_fileinfos;

=======================================
--- /trunk/lib/Devel/NYTProf.pm Mon Jan  4 12:33:17 2010
+++ /trunk/lib/Devel/NYTProf.pm Mon Jan  4 13:42:33 2010
@@ -843,6 +843,18 @@
  you're profiling spawns cpu intensive sub processes then your process will  
be
  impacted by those more than it otherwise would.

+=head3 Windows
+
+On Windows NYTProf uses Time::HiRes which uses the windows
+QueryPerformanceCounter() API with some extra logic to adjust for the  
current
+clock speed and try to resync the raw counter to wallclock time every so  
often
+(every 30 seconds or if the timer drifts by more than 0.5 of a seconds).
+This extra logic may lead to occasional spurious results.
+
+(It would be great if someone could contribute a patch to NYTProf to use
+QueryPerformanceCounter() directly and avoid the overheads and resyncing
+behaviour of Time::HiRes.)
+
  =head2 Virtual Machines

  I recommend you don't do performance profiling while running in a
=======================================
--- /trunk/t/00-load.t  Fri Nov 20 06:08:26 2009
+++ /trunk/t/00-load.t  Mon Jan  4 13:42:33 2010
@@ -2,13 +2,11 @@

  use Config;

+use_ok( 'Devel::NYTProf::Core' );
+
  # we note the time in the test log here (the first test) and in t/zzz.t
  # so we can judge how fast the set of tests ran and this the rough speed  
of the system
-diag("Tests started at ". localtime(time));
-
-use_ok( 'Devel::NYTProf::Core' );
-
-diag( "Testing Devel::NYTProf $Devel::NYTProf::Core::VERSION on perl $]  
$Config{archname}" );
+diag( "Testing Devel::NYTProf $Devel::NYTProf::Core::VERSION started  
at ".localtime(time) );

  use_ok( 'Devel::NYTProf::Constants', qw(
      NYTP_DEFAULT_COMPRESSION NYTP_ZLIB_VERSION
@@ -18,6 +16,13 @@
      NYTP_DEFAULT_COMPRESSION(), NYTP_ZLIB_VERSION()
  );

+diag "--- Perl $] Config on $Config{archname}:";
+diag "\t$_: ".(defined $Config{$_} ? $Config{$_} : '(undef)')
+    for qw(
+        privlibexp archlibexp vendorlibexp
+        d_gettimeod
+    );
+
  if ("$Config{archname} $Config{osvers}" =~ /\b xen \b/x) {
      diag("--- Xen platform issues:");
      diag("It looks like this is running inside a Xen virtual machine.");

-- 
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]

Reply via email to