← 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:07 2014

Filename/usr/local/lib/perl/5.14.2/Moose/Meta/Method.pm
StatementsExecuted 283 statements in 973µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
3011520µs4.15msMoose::Meta::Method::::_inline_throw_errorMoose::Meta::Method::_inline_throw_error
1119µs9µsMoose::Meta::Method::::BEGIN@2Moose::Meta::Method::BEGIN@2
1117µs10µsMoose::Meta::Method::::BEGIN@9Moose::Meta::Method::BEGIN@9
1116µs54µsMoose::Meta::Method::::BEGIN@14Moose::Meta::Method::BEGIN@14
1116µs11µsMoose::Meta::Method::::BEGIN@10Moose::Meta::Method::BEGIN@10
1114µs4µsMoose::Meta::Method::::BEGIN@12Moose::Meta::Method::BEGIN@12
0000s0sMoose::Meta::Method::::_error_throwerMoose::Meta::Method::_error_thrower
0000s0sMoose::Meta::Method::::throw_errorMoose::Meta::Method::throw_error
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Moose::Meta::Method;
2
# spent 9µs within Moose::Meta::Method::BEGIN@2 which was called: # once (9µs+0s) by base::import at line 4
BEGIN {
315µs $Moose::Meta::Method::AUTHORITY = 'cpan:STEVAN';
4141µs19µs}
# spent 9µs making 1 call to Moose::Meta::Method::BEGIN@2
5{
621µs $Moose::Meta::Method::VERSION = '2.1005';
7}
8
9220µs212µs
# spent 10µs (7+3) within Moose::Meta::Method::BEGIN@9 which was called: # once (7µs+3µs) by base::import at line 9
use strict;
# spent 10µs making 1 call to Moose::Meta::Method::BEGIN@9 # spent 3µs making 1 call to strict::import
10219µs215µs
# spent 11µs (6+4) within Moose::Meta::Method::BEGIN@10 which was called: # once (6µs+4µs) by base::import at line 10
use warnings;
# spent 11µs making 1 call to Moose::Meta::Method::BEGIN@10 # spent 4µs making 1 call to warnings::import
11
12224µs14µs
# spent 4µs within Moose::Meta::Method::BEGIN@12 which was called: # once (4µs+0s) by base::import at line 12
use Class::MOP::MiniTrait;
# spent 4µs making 1 call to Moose::Meta::Method::BEGIN@12
13
142227µs254µs
# spent 54µs (6+47) within Moose::Meta::Method::BEGIN@14 which was called: # once (6µs+47µs) by base::import at line 14
use base 'Class::MOP::Method';
# spent 54µs making 1 call to Moose::Meta::Method::BEGIN@14 # spent 47µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 47µs
15
1612µs11.72msClass::MOP::MiniTrait::apply(__PACKAGE__, 'Moose::Meta::Object::Trait');
# spent 1.72ms making 1 call to Class::MOP::MiniTrait::apply
17
18sub _error_thrower {
19 my $self = shift;
20 require Moose::Meta::Class;
21 ( ref $self && $self->associated_metaclass ) || "Moose::Meta::Class";
22}
23
24sub throw_error {
25 my $self = shift;
26 my $inv = $self->_error_thrower;
27 unshift @_, "message" if @_ % 2 == 1;
28 unshift @_, method => $self if ref $self;
29 unshift @_, $inv;
30 my $handler = $inv->can("throw_error");
31 goto $handler; # to avoid incrementing depth by 1
32}
33
34
# spent 4.15ms (520µs+3.63) within Moose::Meta::Method::_inline_throw_error which was called 30 times, avg 138µs/call: # 30 times (520µs+3.63ms) by Class::MOP::Method::Accessor::try {...} at line 142 of Class/MOP/Method/Accessor.pm, avg 138µs/call
sub _inline_throw_error {
35270630µs my ( $self, $msg, $args ) = @_;
36
3730216µs my $inv = $self->_error_thrower;
# spent 216µs making 30 calls to Moose::Meta::Method::Accessor::_error_thrower, avg 7µs/call
38 # XXX ugh
393034µs $inv = 'Moose::Meta::Class' unless $inv->can('_inline_throw_error');
# spent 34µs making 30 calls to UNIVERSAL::can, avg 1µs/call
40
41 # XXX ugh ugh UGH
423048µs my $class = $self->associated_metaclass;
# spent 48µs making 30 calls to Class::MOP::Method::associated_metaclass, avg 2µs/call
43 if ($class) {
446072µs my $class_name = B::perlstring($class->name);
# spent 50µs making 30 calls to B::perlstring, avg 2µs/call # spent 21µs making 30 calls to Class::MOP::Package::name, avg 710ns/call
456037µs my $meth_name = B::perlstring($self->name);
# spent 20µs making 30 calls to B::perlstring, avg 683ns/call # spent 17µs making 30 calls to Class::MOP::Method::name, avg 553ns/call
46 $args = 'method => Class::MOP::class_of(' . $class_name . ')'
47 . '->find_method_by_name(' . $meth_name . '), '
48 . (defined $args ? $args : '');
49 }
50
51303.22ms return $inv->_inline_throw_error($msg, $args)
# spent 3.22ms making 30 calls to Moose::Meta::Attribute::_inline_throw_error, avg 107µs/call
52}
53
5414µs1;
55
56# ABSTRACT: A Moose Method metaclass
57
58__END__