← Index
NYTProf Performance Profile   « block view • line view • sub view »
For mentat.storage.mongo.pl
  Run on Tue Jun 24 10:04:38 2014
Reported on Tue Jun 24 10:05:31 2014

Filename/usr/local/lib/perl/5.14.2/Moose/Meta/Method/Constructor.pm
StatementsExecuted 73 statements in 791µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
511392µs32.7msMoose::Meta::Method::Constructor::::newMoose::Meta::Method::Constructor::new
51126µs32.3msMoose::Meta::Method::Constructor::::_initialize_bodyMoose::Meta::Method::Constructor::_initialize_body
1119µs9µsMoose::Meta::Method::Constructor::::BEGIN@3Moose::Meta::Method::Constructor::BEGIN@3
1119µs35µsMoose::Meta::Method::Constructor::::BEGIN@14Moose::Meta::Method::Constructor::BEGIN@14
1118µs11µsMoose::Meta::Method::Constructor::::BEGIN@10Moose::Meta::Method::Constructor::BEGIN@10
1117µs12µsMoose::Meta::Method::Constructor::::BEGIN@11Moose::Meta::Method::Constructor::BEGIN@11
1117µs43µsMoose::Meta::Method::Constructor::::BEGIN@15Moose::Meta::Method::Constructor::BEGIN@15
1117µs36µsMoose::Meta::Method::Constructor::::BEGIN@16Moose::Meta::Method::Constructor::BEGIN@16
1116µs74µsMoose::Meta::Method::Constructor::::BEGIN@18Moose::Meta::Method::Constructor::BEGIN@18
1114µs4µsMoose::Meta::Method::Constructor::::BEGIN@13Moose::Meta::Method::Constructor::BEGIN@13
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1
2package Moose::Meta::Method::Constructor;
3
# spent 9µs within Moose::Meta::Method::Constructor::BEGIN@3 which was called: # once (9µs+0s) by Moose::Meta::Class::BEGIN@25 at line 5
BEGIN {
415µs $Moose::Meta::Method::Constructor::AUTHORITY = 'cpan:STEVAN';
5130µs19µs}
# spent 9µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@3
6{
721µs $Moose::Meta::Method::Constructor::VERSION = '2.1005';
8}
9
10221µs214µs
# spent 11µs (8+3) within Moose::Meta::Method::Constructor::BEGIN@10 which was called: # once (8µs+3µs) by Moose::Meta::Class::BEGIN@25 at line 10
use strict;
# spent 11µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@10 # spent 3µs making 1 call to strict::import
11225µs218µs
# spent 12µs (7+5) within Moose::Meta::Method::Constructor::BEGIN@11 which was called: # once (7µs+5µs) by Moose::Meta::Class::BEGIN@25 at line 11
use warnings;
# spent 12µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@11 # spent 5µs making 1 call to warnings::import
12
13220µs14µs
# spent 4µs within Moose::Meta::Method::Constructor::BEGIN@13 which was called: # once (4µs+0s) by Moose::Meta::Class::BEGIN@25 at line 13
use Carp ();
# spent 4µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@13
14227µs260µs
# spent 35µs (9+26) within Moose::Meta::Method::Constructor::BEGIN@14 which was called: # once (9µs+26µs) by Moose::Meta::Class::BEGIN@25 at line 14
use List::MoreUtils 'any';
# spent 35µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@14 # spent 26µs making 1 call to Exporter::import
15223µs280µs
# spent 43µs (7+36) within Moose::Meta::Method::Constructor::BEGIN@15 which was called: # once (7µs+36µs) by Moose::Meta::Class::BEGIN@25 at line 15
use Scalar::Util 'blessed', 'weaken', 'looks_like_number', 'refaddr';
# spent 43µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@15 # spent 36µs making 1 call to Exporter::import
16226µs264µs
# spent 36µs (7+29) within Moose::Meta::Method::Constructor::BEGIN@16 which was called: # once (7µs+29µs) by Moose::Meta::Class::BEGIN@25 at line 16
use Try::Tiny;
# spent 36µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@16 # spent 29µs making 1 call to Exporter::import
17
1813µs167µs
# spent 74µs (6+67) within Moose::Meta::Method::Constructor::BEGIN@18 which was called: # once (6µs+67µs) by Moose::Meta::Class::BEGIN@25 at line 19
use base 'Moose::Meta::Method',
# spent 67µs making 1 call to base::import
191187µs174µs 'Class::MOP::Method::Constructor';
# spent 74µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@18
20
21
# spent 32.7ms (392µs+32.3) within Moose::Meta::Method::Constructor::new which was called 5 times, avg 6.55ms/call: # 5 times (392µs+32.3ms) by Class::MOP::Class::_inline_constructor at line 1438 of Class/MOP/Class.pm, avg 6.55ms/call
sub new {
2252µs my $class = shift;
23512µs my %options = @_;
24
2553µs my $meta = $options{metaclass};
26
2754µs (ref $options{options} eq 'HASH')
28 || $class->throw_error("You must pass a hash of options", data => $options{options});
29
3052µs ($options{package_name} && $options{name})
31 || $class->throw_error("You must supply the package_name and name parameters $Class::MOP::Method::UPGRADE_ERROR_TEXT");
32
335332µs my $self = bless {
34 'body' => undef,
35 'package_name' => $options{package_name},
36 'name' => $options{name},
37 'options' => $options{options},
38 'associated_metaclass' => $meta,
39 'definition_context' => $options{definition_context},
40 '_expected_method_class' => $options{_expected_method_class} || 'Moose::Object',
41 } => $class;
42
43 # we don't want this creating
44 # a cycle in the code, if not
45 # needed
46520µs56µs weaken($self->{'associated_metaclass'});
# spent 6µs making 5 calls to Scalar::Util::weaken, avg 1µs/call
47
4857µs532.3ms $self->_initialize_body;
# spent 32.3ms making 5 calls to Moose::Meta::Method::Constructor::_initialize_body, avg 6.47ms/call
49
50515µs return $self;
51}
52
53## method
54
55
# spent 32.3ms (26µs+32.3) within Moose::Meta::Method::Constructor::_initialize_body which was called 5 times, avg 6.47ms/call: # 5 times (26µs+32.3ms) by Moose::Meta::Method::Constructor::new at line 48, avg 6.47ms/call
sub _initialize_body {
5651µs my $self = shift;
57522µs532.3ms $self->{'body'} = $self->_generate_constructor_method_inline;
# spent 32.3ms making 5 calls to Class::MOP::Method::Constructor::_generate_constructor_method_inline, avg 6.46ms/call
58}
59
6013µs1;
61
62# ABSTRACT: Method Meta Object for constructors
63
64__END__