← Index
NYTProf Performance Profile   « line view »
For ../prof.pl
  Run on Thu Dec 15 15:23:56 2022
Reported on Thu Dec 15 15:27:02 2022

Filename/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/MooX/TypeTiny.pm
StatementsExecuted 185 statements in 1.23ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
7772.53ms6.50msMooX::TypeTiny::::importMooX::TypeTiny::import
4799499µs20.9msMooX::TypeTiny::::__ANON__[:25]MooX::TypeTiny::__ANON__[:25]
11121µs24µsMooX::TypeTiny::::BEGIN@2MooX::TypeTiny::BEGIN@2
1117µs27µsMooX::TypeTiny::::BEGIN@7MooX::TypeTiny::BEGIN@7
1114µs34µsMooX::TypeTiny::::BEGIN@3MooX::TypeTiny::BEGIN@3
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package MooX::TypeTiny;
2223µs227µs
# spent 24µs (21+3) within MooX::TypeTiny::BEGIN@2 which was called: # once (21µs+3µs) by JSON::Schema::Modern::BEGIN@29 at line 2
use strict;
# spent 24µs making 1 call to MooX::TypeTiny::BEGIN@2 # spent 3µs making 1 call to strict::import
3234µs264µs
# spent 34µs (4+30) within MooX::TypeTiny::BEGIN@3 which was called: # once (4µs+30µs) by JSON::Schema::Modern::BEGIN@29 at line 3
use warnings;
# spent 34µs making 1 call to MooX::TypeTiny::BEGIN@3 # spent 30µs making 1 call to warnings::import
410sour $VERSION = '0.002003';
512µs$VERSION =~ tr/_//d;
6
72125µs247µs
# spent 27µs (7+20) within MooX::TypeTiny::BEGIN@7 which was called: # once (7µs+20µs) by JSON::Schema::Modern::BEGIN@29 at line 7
use Moo::_Utils qw(_install_modifier);
# spent 27µs making 1 call to MooX::TypeTiny::BEGIN@7 # spent 20µs making 1 call to Exporter::import
8
9
# spent 6.50ms (2.53+3.97) within MooX::TypeTiny::import which was called 7 times, avg 929µs/call: # once (2.46ms+1.83ms) by JSON::Schema::Modern::BEGIN@29 at line 29 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern.pm # once (19µs+523µs) by JSON::Schema::Modern::Error::BEGIN@19 at line 19 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Error.pm # once (9µs+391µs) by JSON::Schema::Modern::Annotation::BEGIN@18 at line 18 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Annotation.pm # once (9µs+323µs) by OpenAPI::Modern::BEGIN@30 at line 30 of OpenAPI/Modern.pm # once (10µs+312µs) by JSON::Schema::Modern::Document::BEGIN@22 at line 22 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Document.pm # once (9µs+306µs) by JSON::Schema::Modern::Document::OpenAPI::BEGIN@25 at line 25 of JSON/Schema/Modern/Document/OpenAPI.pm # once (10µs+284µs) by JSON::Schema::Modern::Result::BEGIN@17 at line 17 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Result.pm
sub import {
1074µs my $target = caller;
1175µs require Moo;
127564µs require Moo::Role;
13
14714µs721µs unless (Moo->is_class($target)) {
# spent 21µs making 7 calls to Moo::is_class, avg 3µs/call
15 die "MooX::TypeTiny can only be used on Moo classes.";
16 }
17
18
# spent 20.9ms (499µs+20.4) within MooX::TypeTiny::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/MooX/TypeTiny.pm:25] which was called 47 times, avg 446µs/call: # 16 times (184µs+605µs) by JSON::Schema::Modern::has at line 4 of (eval 33)[Class/Method/Modifiers.pm:148], avg 49µs/call # 8 times (67µs+115µs) by JSON::Schema::Modern::Document::has at line 4 of (eval 260)[Class/Method/Modifiers.pm:148], avg 23µs/call # 6 times (54µs+422µs) by JSON::Schema::Modern::Result::has at line 4 of (eval 219)[Class/Method/Modifiers.pm:148], avg 79µs/call # 5 times (64µs+17.9ms) by JSON::Schema::Modern::Error::has at line 4 of (eval 192)[Class/Method/Modifiers.pm:148], avg 3.59ms/call # 4 times (32µs+341µs) by JSON::Schema::Modern::Annotation::has at line 4 of (eval 225)[Class/Method/Modifiers.pm:148], avg 93µs/call # 4 times (50µs+69µs) by JSON::Schema::Modern::Document::OpenAPI::has at line 4 of (eval 384)[Class/Method/Modifiers.pm:148], avg 30µs/call # 2 times (20µs+327µs) by OpenAPI::Modern::has at line 4 of (eval 399)[Class/Method/Modifiers.pm:148], avg 174µs/call # once (15µs+369µs) by JSON::Schema::Modern::Document::OpenAPI::extends at line 4 of (eval 386)[Class/Method/Modifiers.pm:148] # once (13µs+329µs) by JSON::Schema::Modern::Document::extends at line 4 of (eval 262)[Class/Method/Modifiers.pm:148]
_install_modifier($target, 'before', ['has', 'extends', 'with'], sub {
1947101µs479.42ms my $am = Moo->_accessor_maker_for($target);
# spent 9.42ms making 47 calls to Moo::_accessor_maker_for, avg 200µs/call
20 $am->does($_) or Moo::Role->apply_roles_to_object($am, $_)
2147139µs543.20ms for qw(MooX::TypeTiny::Role::GenerateAccessor);
# spent 2.72ms making 7 calls to Moo::Role::apply_roles_to_object, avg 388µs/call # spent 470µs making 46 calls to Moo::Role::does_role, avg 10µs/call # spent 14µs making 1 call to Moo::Object::does
22
23 # make sure we have our own constructor
2447162µs477.81ms Moo->_constructor_maker_for($target);
# spent 7.81ms making 47 calls to Moo::_constructor_maker_for, avg 166µs/call
25750µs73.80ms });
# spent 3.80ms making 7 calls to Moo::_Utils::_install_modifier, avg 543µs/call
26}
27
2813µs1;
29__END__