← 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:22:53 2010

File /usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Class/MOP/Object.pm
Statements Executed 790
Statement Execution Time 2.46ms
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
3884752.16ms5.35msClass::MOP::Object::::metaClass::MOP::Object::meta
11115µs18µsClass::MOP::Object::::BEGIN@4Class::MOP::Object::BEGIN@4
1118µs319µsClass::MOP::Object::::_newClass::MOP::Object::_new
1117µs19µsClass::MOP::Object::::BEGIN@5Class::MOP::Object::BEGIN@5
1116µs29µsClass::MOP::Object::::BEGIN@7Class::MOP::Object::BEGIN@7
0000s0sClass::MOP::Object::::dumpClass::MOP::Object::dump
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1
2package Class::MOP::Object;
3
4322µs221µs
# spent 18µs (15+3) within Class::MOP::Object::BEGIN@4 which was called # once (15µs+3µs) by base::import at line 4
use strict;
# spent 18µs making 1 call to Class::MOP::Object::BEGIN@4 # spent 3µs making 1 call to strict::import
5320µs232µs
# spent 19µs (7+12) within Class::MOP::Object::BEGIN@5 which was called # once (7µs+12µs) by base::import at line 5
use warnings;
# spent 19µs making 1 call to Class::MOP::Object::BEGIN@5 # spent 12µs making 1 call to warnings::import
6
73124µs251µs
# spent 29µs (6+23) within Class::MOP::Object::BEGIN@7 which was called # once (6µs+23µs) by base::import at line 7
use Scalar::Util 'blessed';
# spent 29µs making 1 call to Class::MOP::Object::BEGIN@7 # spent 23µs making 1 call to Exporter::import
8
91600nsour $VERSION = '0.98';
10113µs$VERSION = eval $VERSION;
111300nsour $AUTHORITY = 'cpan:STEVAN';
12
13# introspection
14
15
# spent 5.35ms (2.16+3.20) within Class::MOP::Object::meta which was called 388 times, avg 14µs/call: # 154 times (809µs+949µs) by Class::MOP::Method::clone at line 538 of Class/MOP.pm, avg 11µs/call # 85 times (535µs+610µs) by Moose::Meta::Attribute::new at line 59 of Moose/Meta/Attribute.pm, avg 13µs/call # 56 times (288µs+342µs) by Class::MOP::Class::_immutable_metaclass at line 934 of Class/MOP/Class.pm, avg 11µs/call # 30 times (189µs+191µs) by Class::MOP::Class::_construct_class_instance at line 87 of Class/MOP/Class.pm, avg 13µs/call # 12 times (57µs+60µs) by Moose::Exporter::BEGIN@11 at line 678 of Class/MOP.pm, avg 10µs/call # 10 times (47µs+259µs) by Foo::BEGIN@3 at line 244 of Moose.pm, avg 31µs/call # once (13µs+84µs) by Moose::BEGIN@18 at line 30 of Moose/Meta/Class.pm # once (11µs+52µs) by Moose::Meta::TypeCoercion::BEGIN@8 at line 22 of Moose/Meta/Attribute.pm # once (5µs+50µs) by Moose::Exporter::BEGIN@11 at line 551 of Class/MOP.pm # once (5µs+49µs) by Moose::Exporter::BEGIN@11 at line 287 of Class/MOP.pm # once (9µs+41µs) by Moose::Exporter::BEGIN@11 at line 237 of Class/MOP.pm # once (6µs+44µs) by Moose::Exporter::BEGIN@11 at line 322 of Class/MOP.pm # once (5µs+41µs) by Moose::Exporter::BEGIN@11 at line 575 of Class/MOP.pm # once (5µs+41µs) by Moose::Exporter::BEGIN@11 at line 477 of Class/MOP.pm # once (5µs+41µs) by Moose::Exporter::BEGIN@11 at line 626 of Class/MOP.pm # once (5µs+41µs) by Moose::Exporter::BEGIN@11 at line 584 of Class/MOP.pm # once (5µs+41µs) by Moose::Exporter::BEGIN@11 at line 505 of Class/MOP.pm # once (5µs+41µs) by Moose::Exporter::BEGIN@11 at line 607 of Class/MOP.pm # once (5µs+41µs) by Moose::Exporter::BEGIN@11 at line 558 of Class/MOP.pm # once (8µs+15µs) by Moose::Exporter::BEGIN@11 at line 261 of Class/MOP.pm # once (8µs+8µs) by Moose::Exporter::BEGIN@11 at line 663 of Class/MOP.pm # once (6µs+6µs) by Moose::Exporter::BEGIN@11 at line 306 of Class/MOP.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 565 of Class/MOP.pm # once (6µs+6µs) by Moose::Exporter::BEGIN@11 at line 523 of Class/MOP.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 511 of Class/MOP.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 647 of Class/MOP.pm # once (5µs+6µs) by Moose::BEGIN@18 at line 44 of Moose/Meta/Class.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 358 of Class/MOP.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 592 of Class/MOP.pm # once (5µs+6µs) by Moose::BEGIN@18 at line 35 of Moose/Meta/Class.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 495 of Class/MOP.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 666 of Class/MOP.pm # once (5µs+6µs) by Moose::BEGIN@18 at line 54 of Moose/Meta/Class.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 349 of Class/MOP.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 501 of Class/MOP.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 325 of Class/MOP.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 368 of Class/MOP.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 529 of Class/MOP.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 541 of Class/MOP.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 653 of Class/MOP.pm # once (5µs+6µs) by Moose::BEGIN@18 at line 49 of Moose/Meta/Class.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 641 of Class/MOP.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 610 of Class/MOP.pm # once (5µs+6µs) by Moose::BEGIN@18 at line 37 of Moose/Meta/Class.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 517 of Class/MOP.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 632 of Class/MOP.pm # once (5µs+6µs) by Moose::Exporter::BEGIN@11 at line 340 of Class/MOP.pm
sub meta {
167762.27ms require Class::MOP::Class;
17 Class::MOP::Class->initialize(blessed($_[0]) || $_[0]);
# spent 3.00ms making 388 calls to Class::MOP::Class::initialize, avg 8µs/call, recursion: max depth 1, time 174µs # spent 201µs making 388 calls to Scalar::Util::blessed, avg 517ns/call
18}
19
20
# spent 319µs (8+311) within Class::MOP::Object::_new which was called # once (8µs+311µs) by Moose::Meta::TypeConstraint::Registry::new at line 29 of Moose/Meta/TypeConstraint/Registry.pm
sub _new {
2117µs2311µs Class::MOP::class_of(shift)->new_object(@_);
# spent 303µs making 1 call to Class::MOP::Class::new_object # spent 8µs making 1 call to Class::MOP::class_of
22}
23
24# RANT:
25# Cmon, how many times have you written
26# the following code while debugging:
27#
28# use Data::Dumper;
29# warn Dumper $obj;
30#
31# It can get seriously annoying, so why
32# not just do this ...
33sub dump {
34 my $self = shift;
35 require Data::Dumper;
36 local $Data::Dumper::Maxdepth = shift || 1;
37 Data::Dumper::Dumper $self;
38}
39
4014µs1;
41
42__END__
43
44=pod
45
46=head1 NAME
47
48Class::MOP::Object - Base class for metaclasses
49
50=head1 DESCRIPTION
51
52This class is a very minimal base class for metaclasses.
53
54=head1 METHODS
55
56This class provides a few methods which are useful in all metaclasses.
57
58=over 4
59
60=item B<< Class::MOP::???->meta >>
61
62This returns a L<Class::MOP::Class> object.
63
64=item B<< $metaobject->dump($max_depth) >>
65
66This method uses L<Data::Dumper> to dump the object. You can pass an
67optional maximum depth, which will set C<$Data::Dumper::Maxdepth>. The
68default maximum depth is 1.
69
70=back
71
72=head1 AUTHORS
73
74Stevan Little E<lt>stevan@iinteractive.comE<gt>
75
76=head1 COPYRIGHT AND LICENSE
77
78Copyright 2006-2010 by Infinity Interactive, Inc.
79
80L<http://www.iinteractive.com>
81
82This library is free software; you can redistribute it and/or modify
83it under the same terms as Perl itself.
84
85=cut