Author: gisle.aas
Date: Wed Oct 29 13:15:23 2008
New Revision: 570
Added:
trunk/t/22.readstream.t
trunk/t/22.readstream.v20.out
Modified:
trunk/MANIFEST
trunk/NYTProf.xs
Log:
Oops - missing braces on if-block
v2.0 PID_START, PID_END data reported one bogus value.
Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST (original)
+++ trunk/MANIFEST Wed Oct 29 13:15:23 2008
@@ -27,6 +27,8 @@
ppport.h
t/00.load.t
t/20.runtests.t
+t/22.readstream.v20.out
+t/22.readstream.t
t/30.util.t
t/50.errno.t
t/80.version.t
Modified: trunk/NYTProf.xs
==============================================================================
--- trunk/NYTProf.xs (original)
+++ trunk/NYTProf.xs Wed Oct 29 13:15:23 2008
@@ -3193,8 +3193,9 @@
sv_setpvs(cb_args[i], "PID_START"); XPUSHs(cb_args[i++]);
sv_setuv(cb_args[i], pid); XPUSHs(cb_args[i++]);
sv_setuv(cb_args[i], ppid); XPUSHs(cb_args[i++]);
- if (file_minor >= 1)
+ if (file_minor >= 1) {
sv_setuv(cb_args[i], profiler_start_time);
XPUSHs(cb_args[i++]);
+ }
PUTBACK;
call_sv(cb, G_DISCARD);
@@ -3224,8 +3225,9 @@
i = 0;
sv_setpvs(cb_args[i], "PID_END"); XPUSHs(cb_args[i++]);
sv_setuv(cb_args[i], pid); XPUSHs(cb_args[i++]);
- if (file_minor >= 1)
+ if (file_minor >= 1) {
sv_setuv(cb_args[i], profiler_end_time);
XPUSHs(cb_args[i++]);
+ }
PUTBACK;
call_sv(cb, G_DISCARD);
Added: trunk/t/22.readstream.t
==============================================================================
--- (empty file)
+++ trunk/t/22.readstream.t Wed Oct 29 13:15:23 2008
@@ -0,0 +1,34 @@
+use Test::More tests => 8;
+
+use strict;
+use Devel::NYTProf::ReadStream qw(for_chunks);
+
+(my $base = __FILE__) =~ s/\.t$//;
+
+my @arr;
+eval {
+ for_chunks {
+ push(@arr, [$., @_]);
+ } filename => "$base.v20.out";
+};
+SKIP: {
+ if ($@) {
+ skip "No zlib support", 8 if $@ && $@ =~ /compression is not supported/;
+ skip "Unusual NV size", 8 if $@ && $@ =~ /Profile data created by
incompatible perl config/;
+ die $@;
+ }
+
+ is_deeply([0..51], [map shift(@$_), @arr], "chunk seq");
+
+ # some samples
+ is_deeply($arr[0], ["VERSION", 2, 0], "version");
+ is_deeply($arr[3], ["ATTRIBUTE", "xs_version", "2.05"], "attr");
+ is_deeply($arr[10], ["START_DEFLATE"], "deflate");
+ is_deeply($arr[11], ["PID_START", 1710, 13983], "pid start");
+ is_deeply($arr[12], ["NEW_FID", 1, 0, 0, 2, 0,
0, "/Users/gisle/p/Devel-NYTProf/t/test01.p"], "fid");
+ is_deeply($arr[14], ["TIME_BLOCK", 0, 0, 76, 1, 7, 7, 7], "time");
+ is_deeply($arr[15], ["DISCOUNT"], "discount");
+
+ #use Data::Dump; ddx [EMAIL PROTECTED];
+}
+
Added: trunk/t/22.readstream.v20.out
==============================================================================
Binary files
/export/hdc3/borgletdata/dirs/0.worktable2.workers.default.codesite.568036075/logs.0.worktable2.workers.default.codesite.568036075/tmp/tmpT74asE
and
/export/hdc3/borgletdata/dirs/0.worktable2.workers.default.codesite.568036075/logs.0.worktable2.workers.default.codesite.568036075/tmp/tmpfhvcIW
differ
--~--~---------~--~----~------------~-------~--~----~
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]
-~----------~----~----~----~------~----~------~--~---