Revision: 939 Author: tim.bunce Date: Thu Dec 10 03:05:52 2009 Log: Added 'complete' attribute to indicate incomplete/truncated data to avoid false positive test on platforms that don't have compression, like http://www.nntp.perl.org/group/perl.cpan.testers/2009/12/msg6402850.html
http://code.google.com/p/perl-devel-nytprof/source/detail?r=939 Modified: /trunk/NYTProf.xs /trunk/lib/Devel/NYTProf/Run.pm /trunk/t/test01.rdt /trunk/t/test02.rdt /trunk/t/test03.rdt /trunk/t/test05.rdt /trunk/t/test06.rdt /trunk/t/test07.rdt /trunk/t/test08.rdt /trunk/t/test09.rdt /trunk/t/test10.rdt /trunk/t/test11.rdt /trunk/t/test12.rdt /trunk/t/test13.rdt /trunk/t/test14.rdt /trunk/t/test16.rdt /trunk/t/test17-goto.rdt /trunk/t/test20-streval.rdt /trunk/t/test21-streval3.rdt /trunk/t/test22-strevala.rdt /trunk/t/test23-strevall.rdt /trunk/t/test30-fork-0.rdt /trunk/t/test40pmc.rdt /trunk/t/test50-disable.rdt /trunk/t/test51-enable.rdt /trunk/t/test60-subname.rdt /trunk/t/test61-submerge.rdt /trunk/t/test62-subcaller1.rdt /trunk/t/test80-recurs.rdt /trunk/t/test81-swash.t ======================================= --- /trunk/NYTProf.xs Tue Dec 8 08:02:24 2009 +++ /trunk/NYTProf.xs Thu Dec 10 03:05:52 2009 @@ -4524,7 +4524,12 @@ if (HvKEYS(live_pids_hv)) { logwarn("profile data possibly truncated, no terminator for %"IVdf" pids\n", HvKEYS(live_pids_hv)); - } + store_attrib_sv(aTHX_ attr_hv, "complete", &PL_sv_no); + } + else { + store_attrib_sv(aTHX_ attr_hv, "complete", &PL_sv_yes); + } + sv_free((SV*)live_pids_hv); sv_free(tmp_str1_sv); sv_free(tmp_str2_sv); ======================================= --- /trunk/lib/Devel/NYTProf/Run.pm Thu Nov 19 02:58:18 2009 +++ /trunk/lib/Devel/NYTProf/Run.pm Thu Dec 10 03:05:52 2009 @@ -42,6 +42,9 @@ $this_perl .= $Config{_exe} if $^O ne 'VMS' and $this_perl !~ m/$Config{_exe}$/i; +# croaks on failure to execute +# carps, not croak, if process has non-zero exit status +# Devel::NYTProf::Data->new may croak, e.g., if data trucated sub profile_this { my %opt = @_; ======================================= --- /trunk/t/test01.rdt Thu Aug 6 19:20:50 2009 +++ /trunk/t/test01.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test01.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test02.rdt Thu Aug 6 19:20:50 2009 +++ /trunk/t/test02.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test02.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test03.rdt Thu Aug 6 19:20:50 2009 +++ /trunk/t/test03.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test03.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test05.rdt Thu Aug 6 19:20:50 2009 +++ /trunk/t/test05.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test05.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test06.rdt Thu Aug 6 19:20:50 2009 +++ /trunk/t/test06.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test06.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test07.rdt Thu Aug 6 19:20:50 2009 +++ /trunk/t/test07.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test07.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test08.rdt Mon Aug 31 15:04:34 2009 +++ /trunk/t/test08.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test08.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test09.rdt Thu Aug 6 19:20:50 2009 +++ /trunk/t/test09.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test09.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test10.rdt Thu Aug 6 19:20:50 2009 +++ /trunk/t/test10.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test10.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test11.rdt Thu Aug 6 19:20:50 2009 +++ /trunk/t/test11.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test11.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test12.rdt Thu Oct 22 07:42:40 2009 +++ /trunk/t/test12.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test12.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test13.rdt Sat Sep 26 15:57:33 2009 +++ /trunk/t/test13.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test13.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test14.rdt Wed Oct 28 08:22:30 2009 +++ /trunk/t/test14.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test14.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test16.rdt Sat Nov 14 13:27:29 2009 +++ /trunk/t/test16.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test16.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test17-goto.rdt Thu Aug 6 19:20:50 2009 +++ /trunk/t/test17-goto.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test17-goto.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test20-streval.rdt Thu Aug 6 19:20:50 2009 +++ /trunk/t/test20-streval.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test20-streval.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test21-streval3.rdt Thu Oct 22 07:42:40 2009 +++ /trunk/t/test21-streval3.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test21-streval3.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test22-strevala.rdt Thu Aug 6 19:20:50 2009 +++ /trunk/t/test22-strevala.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test22-strevala.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test23-strevall.rdt Mon Aug 31 15:04:34 2009 +++ /trunk/t/test23-strevall.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test23-strevall.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test30-fork-0.rdt Thu Oct 29 10:45:04 2009 +++ /trunk/t/test30-fork-0.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test30-fork-0.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test40pmc.rdt Thu Aug 6 19:20:50 2009 +++ /trunk/t/test40pmc.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test40pmc.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test50-disable.rdt Thu Aug 6 19:20:50 2009 +++ /trunk/t/test50-disable.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test50-disable.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test51-enable.rdt Thu Aug 6 19:20:50 2009 +++ /trunk/t/test51-enable.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test51-enable.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test60-subname.rdt Fri Nov 20 06:22:30 2009 +++ /trunk/t/test60-subname.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test60-subname.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test61-submerge.rdt Fri Oct 2 14:24:18 2009 +++ /trunk/t/test61-submerge.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test61-submerge.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test62-subcaller1.rdt Sat Nov 14 14:49:13 2009 +++ /trunk/t/test62-subcaller1.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test62-subcaller1.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test80-recurs.rdt Thu Oct 22 07:42:40 2009 +++ /trunk/t/test80-recurs.rdt Thu Dec 10 03:05:52 2009 @@ -1,6 +1,7 @@ attribute application test80-recurs.p attribute basetime 0 attribute clock_id 0 +attribute complete 1 attribute nv_size 0 attribute perl_version 0 attribute profiler_duration 0 ======================================= --- /trunk/t/test81-swash.t Sun Dec 6 04:43:19 2009 +++ /trunk/t/test81-swash.t Thu Dec 10 03:05:52 2009 @@ -19,7 +19,7 @@ start => 'begin', compress => 1, }, - extra_test_count => 1, + extra_test_count => 2, extra_test_code => sub { my ($profile, $env) = @_; @@ -28,6 +28,8 @@ out_file => $env->{file}, ); isa_ok $profile, 'Devel::NYTProf::Data'; + # check if data truncated due to assertion failure + ok $profile->{attribute}{complete}; }, }); -- 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]
