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

Filename/usr/local/lib/perl/5.14.2/Moose/Error/Default.pm
StatementsExecuted 452 statements in 1.31ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
14511716µs716µsMoose::Error::Default::::_inline_newMoose::Error::Default::_inline_new
111307µs339µsMoose::Error::Default::::BEGIN@15Moose::Error::Default::BEGIN@15
111154µs162µsMoose::Error::Default::::BEGIN@12Moose::Error::Default::BEGIN@12
1119µs9µsMoose::Error::Default::::BEGIN@2Moose::Error::Default::BEGIN@2
1117µs12µsMoose::Error::Default::::BEGIN@10Moose::Error::Default::BEGIN@10
1117µs9µsMoose::Error::Default::::BEGIN@9Moose::Error::Default::BEGIN@9
1117µs47µsMoose::Error::Default::::BEGIN@17Moose::Error::Default::BEGIN@17
1115µs5µsMoose::Error::Default::::BEGIN@13Moose::Error::Default::BEGIN@13
0000s0sMoose::Error::Default::::create_error_confessMoose::Error::Default::create_error_confess
0000s0sMoose::Error::Default::::create_error_croakMoose::Error::Default::create_error_croak
0000s0sMoose::Error::Default::::newMoose::Error::Default::new
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Moose::Error::Default;
2
# spent 9µs within Moose::Error::Default::BEGIN@2 which was called: # once (9µs+0s) by Moose::Meta::Class::BEGIN@23 at line 4
BEGIN {
315µs $Moose::Error::Default::AUTHORITY = 'cpan:STEVAN';
4128µs19µs}
# spent 9µs making 1 call to Moose::Error::Default::BEGIN@2
5{
621µs $Moose::Error::Default::VERSION = '2.1005';
7}
8
9226µs212µs
# spent 9µs (7+3) within Moose::Error::Default::BEGIN@9 which was called: # once (7µs+3µs) by Moose::Meta::Class::BEGIN@23 at line 9
use strict;
# spent 9µs making 1 call to Moose::Error::Default::BEGIN@9 # spent 3µs making 1 call to strict::import
10221µs217µs
# spent 12µs (7+5) within Moose::Error::Default::BEGIN@10 which was called: # once (7µs+5µs) by Moose::Meta::Class::BEGIN@23 at line 10
use warnings;
# spent 12µs making 1 call to Moose::Error::Default::BEGIN@10 # spent 5µs making 1 call to warnings::import
11
12292µs1162µs
# spent 162µs (154+8) within Moose::Error::Default::BEGIN@12 which was called: # once (154µs+8µs) by Moose::Meta::Class::BEGIN@23 at line 12
use Carp::Heavy;
# spent 162µs making 1 call to Moose::Error::Default::BEGIN@12
13220µs15µs
# spent 5µs within Moose::Error::Default::BEGIN@13 which was called: # once (5µs+0s) by Moose::Meta::Class::BEGIN@23 at line 13
use Class::MOP::MiniTrait;
# spent 5µs making 1 call to Moose::Error::Default::BEGIN@13
14
15296µs1339µs
# spent 339µs (307+32) within Moose::Error::Default::BEGIN@15 which was called: # once (307µs+32µs) by Moose::Meta::Class::BEGIN@23 at line 15
use Moose::Error::Util;
# spent 339µs making 1 call to Moose::Error::Default::BEGIN@15
16
172168µs287µs
# spent 47µs (7+40) within Moose::Error::Default::BEGIN@17 which was called: # once (7µs+40µs) by Moose::Meta::Class::BEGIN@23 at line 17
use base 'Class::MOP::Object';
# spent 47µs making 1 call to Moose::Error::Default::BEGIN@17 # spent 40µs making 1 call to base::import
18
1912µs1889µsClass::MOP::MiniTrait::apply(__PACKAGE__, 'Moose::Meta::Object::Trait');
# spent 889µs making 1 call to Class::MOP::MiniTrait::apply
20
21sub new {
22 my ( $self, @args ) = @_;
23 # can't use Moose::Error::Util::create_error here because that would break
24 # inheritance. we don't care about that for the inlined version, because
25 # the inlined versions are explicitly not inherited.
26 if (defined $ENV{MOOSE_ERROR_STYLE} && $ENV{MOOSE_ERROR_STYLE} eq 'croak') {
27 $self->create_error_croak( @args );
28 }
29 else {
30 $self->create_error_confess( @args );
31 }
32}
33
34
# spent 716µs within Moose::Error::Default::_inline_new which was called 145 times, avg 5µs/call: # 145 times (716µs+0s) by Moose::Meta::Class::_inline_create_error at line 855 of Moose/Meta/Class.pm, avg 5µs/call
sub _inline_new {
35145222µs my ( $self, %args ) = @_;
36
3714588µs my $depth = ($args{depth} || 0) - 1;
38145537µs return 'Moose::Error::Util::create_error('
39 . 'message => ' . $args{message} . ', '
40 . 'depth => ' . $depth . ', '
41 . ')';
42}
43
44sub create_error_croak {
45 my ( $self, @args ) = @_;
46 return Moose::Error::Util::create_error_croak(@args);
47}
48
49sub create_error_confess {
50 my ( $self, @args ) = @_;
51 return Moose::Error::Util::create_error_confess(@args);
52}
53
5414µs1;
55
56# ABSTRACT: L<Carp> based error generation for Moose.
57
58__END__