← Index
NYTProf Performance Profile   « block view • line view • sub view »
For mentat.storage.mongo.pl
  Run on Tue Jun 24 09:58:41 2014
Reported on Tue Jun 24 09:59:21 2014

Filename/usr/local/lib/perl/5.14.2/Moose/Meta/Method/Constructor.pm
StatementsExecuted 73 statements in 764µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
511369µs31.9msMoose::Meta::Method::Constructor::::newMoose::Meta::Method::Constructor::new
51136µs31.5msMoose::Meta::Method::Constructor::::_initialize_bodyMoose::Meta::Method::Constructor::_initialize_body
1118µs8µsMoose::Meta::Method::Constructor::::BEGIN@3Moose::Meta::Method::Constructor::BEGIN@3
1117µs10µsMoose::Meta::Method::Constructor::::BEGIN@10Moose::Meta::Method::Constructor::BEGIN@10
1117µs36µsMoose::Meta::Method::Constructor::::BEGIN@16Moose::Meta::Method::Constructor::BEGIN@16
1117µs11µsMoose::Meta::Method::Constructor::::BEGIN@11Moose::Meta::Method::Constructor::BEGIN@11
1116µs43µsMoose::Meta::Method::Constructor::::BEGIN@15Moose::Meta::Method::Constructor::BEGIN@15
1116µs77µsMoose::Meta::Method::Constructor::::BEGIN@18Moose::Meta::Method::Constructor::BEGIN@18
1116µs32µsMoose::Meta::Method::Constructor::::BEGIN@14Moose::Meta::Method::Constructor::BEGIN@14
1113µs3µ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 8µs within Moose::Meta::Method::Constructor::BEGIN@3 which was called: # once (8µs+0s) by Moose::Meta::Class::BEGIN@25 at line 5
BEGIN {
415µs $Moose::Meta::Method::Constructor::AUTHORITY = 'cpan:STEVAN';
5129µs18µs}
# spent 8µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@3
6{
721µs $Moose::Meta::Method::Constructor::VERSION = '2.1005';
8}
9
10221µs213µs
# spent 10µs (7+3) within Moose::Meta::Method::Constructor::BEGIN@10 which was called: # once (7µs+3µs) by Moose::Meta::Class::BEGIN@25 at line 10
use strict;
# spent 10µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@10 # spent 3µs making 1 call to strict::import
11224µs216µs
# spent 11µ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 11µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@11 # spent 5µs making 1 call to warnings::import
12
13223µs13µs
# spent 3µs within Moose::Meta::Method::Constructor::BEGIN@13 which was called: # once (3µs+0s) by Moose::Meta::Class::BEGIN@25 at line 13
use Carp ();
# spent 3µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@13
14227µs258µs
# spent 32µs (6+26) within Moose::Meta::Method::Constructor::BEGIN@14 which was called: # once (6µs+26µs) by Moose::Meta::Class::BEGIN@25 at line 14
use List::MoreUtils 'any';
# spent 32µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@14 # spent 26µs making 1 call to Exporter::import
15222µs279µs
# spent 43µs (6+36) within Moose::Meta::Method::Constructor::BEGIN@15 which was called: # once (6µ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
18170µs
# spent 77µs (6+70) within Moose::Meta::Method::Constructor::BEGIN@18 which was called: # once (6µs+70µs) by Moose::Meta::Class::BEGIN@25 at line 19
use base 'Moose::Meta::Method',
# spent 70µs making 1 call to base::import
192176µs177µs 'Class::MOP::Method::Constructor';
# spent 77µs making 1 call to Moose::Meta::Method::Constructor::BEGIN@18
20
21
# spent 31.9ms (369µs+31.5) within Moose::Meta::Method::Constructor::new which was called 5 times, avg 6.37ms/call: # 5 times (369µs+31.5ms) by Class::MOP::Class::_inline_constructor at line 1438 of Class/MOP/Class.pm, avg 6.37ms/call
sub new {
2245373µs my $class = shift;
23 my %options = @_;
24
25 my $meta = $options{metaclass};
26
27 (ref $options{options} eq 'HASH')
28 || $class->throw_error("You must pass a hash of options", data => $options{options});
29
30 ($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
33 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
4655µs weaken($self->{'associated_metaclass'});
# spent 5µs making 5 calls to Scalar::Util::weaken, avg 1µs/call
47
48531.5ms $self->_initialize_body;
# spent 31.5ms making 5 calls to Moose::Meta::Method::Constructor::_initialize_body, avg 6.30ms/call
49
50 return $self;
51}
52
53## method
54
55
# spent 31.5ms (36µs+31.5) within Moose::Meta::Method::Constructor::_initialize_body which was called 5 times, avg 6.30ms/call: # 5 times (36µs+31.5ms) by Moose::Meta::Method::Constructor::new at line 48, avg 6.30ms/call
sub _initialize_body {
561034µs my $self = shift;
57531.5ms $self->{'body'} = $self->_generate_constructor_method_inline;
# spent 31.5ms making 5 calls to Class::MOP::Method::Constructor::_generate_constructor_method_inline, avg 6.29ms/call
58}
59
6012µs1;
61
62# ABSTRACT: Method Meta Object for constructors
63
64__END__