← Index
NYTProf Performance Profile   « block view • line view • sub view »
For 05.Domain_and_Item.t
  Run on Tue May 4 17:21:41 2010
Reported on Tue May 4 17:23:02 2010

File /usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/DateTime/Helpers.pm
Statements Executed 27
Statement Execution Time 182µs
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
42131µs38µsDateTime::Helpers::::canDateTime::Helpers::can
11114µs16µsDateTime::Helpers::::BEGIN@3DateTime::Helpers::BEGIN@3
1116µs15µsDateTime::Helpers::::BEGIN@4DateTime::Helpers::BEGIN@4
1113µs3µsDateTime::Helpers::::BEGIN@8DateTime::Helpers::BEGIN@8
0000s0sDateTime::Helpers::::isaDateTime::Helpers::isa
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package DateTime::Helpers;
2
3320µs219µs
# spent 16µs (14+3) within DateTime::Helpers::BEGIN@3 which was called # once (14µs+3µs) by DateTime::BEGIN@9 at line 3
use strict;
# spent 16µs making 1 call to DateTime::Helpers::BEGIN@3 # spent 3µs making 1 call to strict::import
4327µs223µs
# spent 15µs (6+8) within DateTime::Helpers::BEGIN@4 which was called # once (6µs+8µs) by DateTime::BEGIN@9 at line 4
use warnings;
# spent 15µs making 1 call to DateTime::Helpers::BEGIN@4 # spent 8µs making 1 call to warnings::import
5
61600nsour $VERSION = '0.55';
7
8391µs13µs
# spent 3µs within DateTime::Helpers::BEGIN@8 which was called # once (3µs+0s) by DateTime::BEGIN@9 at line 8
use Scalar::Util ();
# spent 3µs making 1 call to DateTime::Helpers::BEGIN@8
9
10
# spent 38µs (31+7) within DateTime::Helpers::can which was called 4 times, avg 10µs/call: # 2 times (23µs+4µs) by DateTime::_compare at line 1791 of DateTime.pm, avg 14µs/call # 2 times (8µs+3µs) by DateTime::_compare at line 1800 of DateTime.pm, avg 6µs/call
sub can {
1141µs my $object = shift;
1242µs my $method = shift;
13
14413µs43µs return unless Scalar::Util::blessed($object);
# spent 3µs making 4 calls to Scalar::Util::blessed, avg 700ns/call
15425µs44µs return $object->can($method);
# spent 4µs making 4 calls to UNIVERSAL::can, avg 1µs/call
16}
17
18sub isa {
19 my $object = shift;
20 my $method = shift;
21
22 return unless Scalar::Util::blessed($object);
23 return $object->isa($method);
24}
25
2613µs1;
27
28__END__
29
30=head1 NAME
31
32DateTime::Helpers - Helper functions for other DateTime modules
33
34=head1 AUTHOR
35
36Dave Rolsky <autarch@urth.org>
37
38However, please see the CREDITS file for more details on who I really
39stole all the code from.
40
41=head1 COPYRIGHT
42
43Copyright (c) 2003-2010 David Rolsky. All rights reserved. This
44program is free software; you can redistribute it and/or modify it
45under the same terms as Perl itself.
46
47=cut