← Index
NYTProf Performance Profile   « block view • line view • sub view »
For script/nytprof.pl
  Run on Thu May 31 16:29:39 2012
Reported on Thu May 31 16:37:53 2012

Filename/Users/edenc/perl5/lib/perl5/KiokuDB/Serializer.pm
StatementsExecuted 14 statements in 405µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11123µs2.82msKiokuDB::Serializer::::BEGIN@4KiokuDB::Serializer::BEGIN@4
11111µs47µsKiokuDB::Serializer::::BEGIN@6KiokuDB::Serializer::BEGIN@6
11110µs820µsKiokuDB::Serializer::::BEGIN@10KiokuDB::Serializer::BEGIN@10
11110µs1.81msKiokuDB::Serializer::::BEGIN@8KiokuDB::Serializer::BEGIN@8
0000s0sKiokuDB::Serializer::::__ANON__[:28]KiokuDB::Serializer::__ANON__[:28]
0000s0sKiokuDB::Serializer::::__ANON__[:34]KiokuDB::Serializer::__ANON__[:34]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1#!/usr/bin/perl
2
3package KiokuDB::Serializer;
4253µs25.62ms
# spent 2.82ms (23µs+2.80) within KiokuDB::Serializer::BEGIN@4 which was called: # once (23µs+2.80ms) by KiokuDB::Backend::Serialize::Delegate::BEGIN@6 at line 4
use Moose::Role;
# spent 2.82ms making 1 call to KiokuDB::Serializer::BEGIN@4 # spent 2.80ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:492]
5
6228µs282µs
# spent 47µs (11+36) within KiokuDB::Serializer::BEGIN@6 which was called: # once (11µs+36µs) by KiokuDB::Backend::Serialize::Delegate::BEGIN@6 at line 6
use Carp qw(croak);
# spent 47µs making 1 call to KiokuDB::Serializer::BEGIN@6 # spent 36µs making 1 call to Exporter::import
7
8245µs23.60ms
# spent 1.81ms (10µs+1.80) within KiokuDB::Serializer::BEGIN@8 which was called: # once (10µs+1.80ms) by KiokuDB::Backend::Serialize::Delegate::BEGIN@6 at line 8
use Moose::Util::TypeConstraints;
# spent 1.81ms making 1 call to KiokuDB::Serializer::BEGIN@8 # spent 1.80ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:492]
9
102229µs21.63ms
# spent 820µs (10+810) within KiokuDB::Serializer::BEGIN@10 which was called: # once (10µs+810µs) by KiokuDB::Backend::Serialize::Delegate::BEGIN@6 at line 10
use namespace::clean -except => 'meta';
# spent 820µs making 1 call to KiokuDB::Serializer::BEGIN@10 # spent 810µs making 1 call to namespace::clean::import
11
1214µs19.05mswith qw(KiokuDB::Backend::Serialize);
# spent 9.05ms making 1 call to Moose::Role::with
13
1412µs160µsrequires "serialize_to_stream";
# spent 60µs making 1 call to Moose::Role::requires
1511µs143µsrequires "deserialize_from_stream";
# spent 43µs making 1 call to Moose::Role::requires
16
1712µsmy %types = (
18 storable => "KiokuDB::Serializer::Storable",
19 json => "KiokuDB::Serializer::JSON",
20 yaml => "KiokuDB::Serializer::YAML",
21);
22
23coerce( __PACKAGE__,
24 from Str => via {
25 my $class = $types{lc($_)} or croak "unknown format: $_";;
26 Class::MOP::load_class($class);
27 $class->new;
28 },
29 from HashRef => via {
30 my %args = %$_;
31 my $class = $types{lc(delete $args{format})} or croak "unknown format: $args{format}";
32 Class::MOP::load_class($class);
33 $class->new(%args);
34 },
35112µs5316µs);
# spent 312µs making 1 call to Moose::Util::TypeConstraints::coerce # spent 3µs making 2 calls to Moose::Util::TypeConstraints::from, avg 1µs/call # spent 2µs making 2 calls to Moose::Util::TypeConstraints::via, avg 1µs/call
36
37118µs__PACKAGE__
38
39112µs12.10ms__END__