← Index
NYTProf Performance Profile   « line view »
For ../prof.pl
  Run on Wed Dec 14 15:33:55 2022
Reported on Wed Dec 14 15:40:04 2022

Filename/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/JSON/Schema/Modern/Annotation.pm
StatementsExecuted 72072 statements in 240ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
7203711266ms1.05sJSON::Schema::Modern::Annotation::::__ANON__[:35]JSON::Schema::Modern::Annotation::__ANON__[:35]
11135µs38µsJSON::Schema::Modern::Result::::BEGIN@1 JSON::Schema::Modern::Result::BEGIN@1
11120µs883µsJSON::Schema::Modern::Annotation::::BEGIN@11JSON::Schema::Modern::Annotation::BEGIN@11
11116µs42µsJSON::Schema::Modern::Annotation::::BEGIN@13JSON::Schema::Modern::Annotation::BEGIN@13
11112µs35µsJSON::Schema::Modern::Annotation::::BEGIN@14JSON::Schema::Modern::Annotation::BEGIN@14
11112µs26µsJSON::Schema::Modern::Annotation::::BEGIN@15JSON::Schema::Modern::Annotation::BEGIN@15
11112µs230µsJSON::Schema::Modern::Annotation::::BEGIN@20JSON::Schema::Modern::Annotation::BEGIN@20
11112µs12µsJSON::Schema::Modern::Annotation::::BEGIN@9JSON::Schema::Modern::Annotation::BEGIN@9
11111µs29µsJSON::Schema::Modern::Annotation::::BEGIN@16JSON::Schema::Modern::Annotation::BEGIN@16
11111µs609µsJSON::Schema::Modern::Annotation::::BEGIN@19JSON::Schema::Modern::Annotation::BEGIN@19
11110µs121µsJSON::Schema::Modern::Annotation::::BEGIN@17JSON::Schema::Modern::Annotation::BEGIN@17
1119µs469µsJSON::Schema::Modern::Annotation::::BEGIN@18JSON::Schema::Modern::Annotation::BEGIN@18
1118µs124µsJSON::Schema::Modern::Annotation::::BEGIN@12JSON::Schema::Modern::Annotation::BEGIN@12
1117µs304µsJSON::Schema::Modern::Annotation::::BEGIN@10JSON::Schema::Modern::Annotation::BEGIN@10
1117µs37µsJSON::Schema::Modern::Result::::BEGIN@2 JSON::Schema::Modern::Result::BEGIN@2
0000s0sJSON::Schema::Modern::Annotation::::TO_JSONJSON::Schema::Modern::Annotation::TO_JSON
0000s0sJSON::Schema::Modern::Annotation::::dumpJSON::Schema::Modern::Annotation::dump
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1234µs241µs
# spent 38µs (35+3) within JSON::Schema::Modern::Result::BEGIN@1 which was called: # once (35µs+3µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 1
use strict;
# spent 38µs making 1 call to JSON::Schema::Modern::Result::BEGIN@1 # spent 3µs making 1 call to strict::import
2244µs267µs
# spent 37µs (7+30) within JSON::Schema::Modern::Result::BEGIN@2 which was called: # once (7µs+30µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 2
use warnings;
# spent 37µs making 1 call to JSON::Schema::Modern::Result::BEGIN@2 # spent 30µs making 1 call to warnings::import
3package JSON::Schema::Modern::Annotation;
4# vim: set ts=8 sts=2 sw=2 tw=100 et :
5# ABSTRACT: Contains a single annotation from a JSON Schema evaluation
6
711µsour $VERSION = '0.552';
8
9244µs112µs
# spent 12µs within JSON::Schema::Modern::Annotation::BEGIN@9 which was called: # once (12µs+0s) by JSON::Schema::Modern::Result::BEGIN@20 at line 9
use 5.020;
# spent 12µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@9
10229µs2601µs
# spent 304µs (7+297) within JSON::Schema::Modern::Annotation::BEGIN@10 which was called: # once (7µs+297µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 10
use Moo;
# spent 304µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@10 # spent 297µs making 1 call to Moo::import
11336µs31.75ms
# spent 883µs (20+863) within JSON::Schema::Modern::Annotation::BEGIN@11 which was called: # once (20µs+863µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 11
use strictures 2;
# spent 883µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@11 # spent 842µs making 1 call to strictures::import # spent 20µs making 1 call to strictures::VERSION
12238µs2240µs
# spent 124µs (8+116) within JSON::Schema::Modern::Annotation::BEGIN@12 which was called: # once (8µs+116µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 12
use experimental qw(signatures postderef);
# spent 124µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@12 # spent 116µs making 1 call to experimental::import
13245µs243µs
# spent 42µs (16+26) within JSON::Schema::Modern::Annotation::BEGIN@13 which was called: # once (16µs+26µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 13
use if "$]" >= 5.022, experimental => 're_strict';
# spent 42µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@13 # spent 1µs making 1 call to if::import
14231µs238µs
# spent 35µs (12+23) within JSON::Schema::Modern::Annotation::BEGIN@14 which was called: # once (12µs+23µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 14
no if "$]" >= 5.031009, feature => 'indirect';
# spent 35µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@14 # spent 3µs making 1 call to if::unimport
15228µs227µs
# spent 26µs (12+14) within JSON::Schema::Modern::Annotation::BEGIN@15 which was called: # once (12µs+14µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 15
no if "$]" >= 5.033001, feature => 'multidimensional';
# spent 26µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@15 # spent 1µs making 1 call to if::unimport
16221µs230µs
# spent 29µs (11+18) within JSON::Schema::Modern::Annotation::BEGIN@16 which was called: # once (11µs+18µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 16
no if "$]" >= 5.033006, feature => 'bareword_filehandles';
# spent 29µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@16 # spent 1µs making 1 call to if::unimport
17228µs2232µs
# spent 121µs (10+111) within JSON::Schema::Modern::Annotation::BEGIN@17 which was called: # once (10µs+111µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 17
use Safe::Isa;
# spent 121µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@17 # spent 111µs making 1 call to Exporter::import
18231µs2929µs
# spent 469µs (9+460) within JSON::Schema::Modern::Annotation::BEGIN@18 which was called: # once (9µs+460µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 18
use MooX::TypeTiny;
# spent 469µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@18 # spent 460µs making 1 call to MooX::TypeTiny::import
19233µs21.21ms
# spent 609µs (11+598) within JSON::Schema::Modern::Annotation::BEGIN@19 which was called: # once (11µs+598µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 19
use Types::Standard qw(Str InstanceOf Bool);
# spent 609µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@19 # spent 598µs making 1 call to Exporter::Tiny::import
202317µs2448µs
# spent 230µs (12+218) within JSON::Schema::Modern::Annotation::BEGIN@20 which was called: # once (12µs+218µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 20
use namespace::clean;
# spent 230µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@20 # spent 218µs making 1 call to namespace::clean::import
21
2214µs22.25mshas [qw(
# spent 2.25ms making 1 call to JSON::Schema::Modern::Annotation::has # spent 2µs making 1 call to Types::Standard::Str
23 keyword
24 instance_location
25 keyword_location
26)] => (
27 is => 'ro',
28 isa => Str,
29 required => 1,
30);
31
32has absolute_keyword_location => (
33 is => 'ro',
34 isa => InstanceOf['Mojo::URL'],
3572037239ms72037782ms
# spent 1.05s (266ms+782ms) within JSON::Schema::Modern::Annotation::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/JSON/Schema/Modern/Annotation.pm:35] which was called 72037 times, avg 15µs/call: # 72037 times (266ms+782ms) by JSON::Schema::Modern::Annotation::new at line 65 of (eval 431)[Sub/Quote.pm:3], avg 15µs/call
coerce => sub { $_[0]->$_isa('Mojo::URL') ? $_[0] : Mojo::URL->new($_[0]) },
# spent 782ms making 72037 calls to Safe::Isa::__ANON__[Safe/Isa.pm:23], avg 11µs/call
36112µs2549µs);
# spent 450µs making 1 call to JSON::Schema::Modern::Annotation::has # spent 99µs making 1 call to Types::Standard::InstanceOf
37
38# https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.7.7.1
3911µs1390µshas annotation => (
# spent 390µs making 1 call to JSON::Schema::Modern::Annotation::has
40 is => 'ro',
41 required => 1,
42);
43
4414µs2786µshas unknown => (
# spent 784µs making 1 call to JSON::Schema::Modern::Annotation::has # spent 2µs making 1 call to Types::Standard::Bool
45 is => 'ro',
46 isa => Bool,
47 default => 0,
48);
49
50sub TO_JSON ($self) {
51 return +{
52 # note that locations are JSON pointers, not uri fragments!
53 instanceLocation => $self->instance_location,
54 keywordLocation => $self->keyword_location,
55 !defined($self->absolute_keyword_location) ? ()
56 : ( absoluteKeywordLocation => $self->absolute_keyword_location->to_string ),
57 annotation => $self->annotation,
58 };
59}
60
61sub dump ($self) {
62 my $encoder = JSON::MaybeXS->new(utf8 => 0, convert_blessed => 1, canonical => 1, pretty => 1);
63 $encoder->indent_length(2) if $encoder->can('indent_length');
64 $encoder->encode($self);
65}
66
67117µs1;
68
69122µs1299µs__END__