Filename | /Users/ether/.perlbrew/libs/36.0@std/lib/perl5/JSON/Schema/Modern/Annotation.pm |
Statements | Executed 71825 statements in 296ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
71790 | 1 | 1 | 298ms | 1.15s | __ANON__[:35] | JSON::Schema::Modern::Annotation::
1 | 1 | 1 | 52µs | 59µs | BEGIN@1 | JSON::Schema::Modern::Result::
1 | 1 | 1 | 29µs | 1.13ms | BEGIN@11 | JSON::Schema::Modern::Annotation::
1 | 1 | 1 | 22µs | 60µs | BEGIN@13 | JSON::Schema::Modern::Annotation::
1 | 1 | 1 | 16µs | 708µs | BEGIN@10 | JSON::Schema::Modern::Annotation::
1 | 1 | 1 | 16µs | 16µs | BEGIN@9 | JSON::Schema::Modern::Annotation::
1 | 1 | 1 | 14µs | 29µs | BEGIN@16 | JSON::Schema::Modern::Annotation::
1 | 1 | 1 | 13µs | 34µs | BEGIN@14 | JSON::Schema::Modern::Annotation::
1 | 1 | 1 | 13µs | 34µs | BEGIN@15 | JSON::Schema::Modern::Annotation::
1 | 1 | 1 | 11µs | 140µs | BEGIN@17 | JSON::Schema::Modern::Annotation::
1 | 1 | 1 | 11µs | 686µs | BEGIN@19 | JSON::Schema::Modern::Annotation::
1 | 1 | 1 | 11µs | 267µs | BEGIN@20 | JSON::Schema::Modern::Annotation::
1 | 1 | 1 | 10µs | 139µs | BEGIN@12 | JSON::Schema::Modern::Annotation::
1 | 1 | 1 | 10µs | 742µs | BEGIN@18 | JSON::Schema::Modern::Annotation::
1 | 1 | 1 | 8µs | 66µs | BEGIN@2 | JSON::Schema::Modern::Result::
0 | 0 | 0 | 0s | 0s | TO_JSON | JSON::Schema::Modern::Annotation::
0 | 0 | 0 | 0s | 0s | dump | JSON::Schema::Modern::Annotation::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | 2 | 52µs | 2 | 66µs | # spent 59µs (52+7) within JSON::Schema::Modern::Result::BEGIN@1 which was called:
# once (52µs+7µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 1 # spent 59µs making 1 call to JSON::Schema::Modern::Result::BEGIN@1
# spent 7µs making 1 call to strict::import |
2 | 2 | 62µs | 2 | 124µs | # spent 66µs (8+58) within JSON::Schema::Modern::Result::BEGIN@2 which was called:
# once (8µs+58µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 2 # spent 66µs making 1 call to JSON::Schema::Modern::Result::BEGIN@2
# spent 58µs making 1 call to warnings::import |
3 | package 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 | |||||
7 | 1 | 0s | our $VERSION = '0.556'; | ||
8 | |||||
9 | 2 | 61µs | 1 | 16µs | # spent 16µs within JSON::Schema::Modern::Annotation::BEGIN@9 which was called:
# once (16µs+0s) by JSON::Schema::Modern::Result::BEGIN@20 at line 9 # spent 16µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@9 |
10 | 2 | 66µs | 2 | 1.40ms | # spent 708µs (16+692) within JSON::Schema::Modern::Annotation::BEGIN@10 which was called:
# once (16µs+692µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 10 # spent 708µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@10
# spent 692µs making 1 call to Moo::import |
11 | 3 | 81µs | 3 | 2.23ms | # spent 1.13ms (29µs+1.10) within JSON::Schema::Modern::Annotation::BEGIN@11 which was called:
# once (29µs+1.10ms) by JSON::Schema::Modern::Result::BEGIN@20 at line 11 # spent 1.13ms making 1 call to JSON::Schema::Modern::Annotation::BEGIN@11
# spent 1.07ms making 1 call to strictures::import
# spent 33µs making 1 call to strictures::VERSION |
12 | 2 | 75µs | 2 | 268µs | # spent 139µs (10+129) within JSON::Schema::Modern::Annotation::BEGIN@12 which was called:
# once (10µs+129µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 12 # spent 139µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@12
# spent 129µs making 1 call to experimental::import |
13 | 2 | 50µs | 2 | 65µs | # spent 60µs (22+38) within JSON::Schema::Modern::Annotation::BEGIN@13 which was called:
# once (22µs+38µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 13 # spent 60µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@13
# spent 5µs making 1 call to if::import |
14 | 2 | 82µs | 2 | 35µs | # spent 34µs (13+21) within JSON::Schema::Modern::Annotation::BEGIN@14 which was called:
# once (13µs+21µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 14 # spent 34µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@14
# spent 1µs making 1 call to if::unimport |
15 | 2 | 38µs | 2 | 37µs | # spent 34µs (13+21) within JSON::Schema::Modern::Annotation::BEGIN@15 which was called:
# once (13µs+21µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 15 # spent 34µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@15
# spent 3µs making 1 call to if::unimport |
16 | 2 | 33µs | 2 | 29µs | # spent 29µs (14+15) within JSON::Schema::Modern::Annotation::BEGIN@16 which was called:
# once (14µs+15µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 16 # spent 29µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@16
# spent 0s making 1 call to if::unimport |
17 | 2 | 32µs | 2 | 269µs | # spent 140µs (11+129) within JSON::Schema::Modern::Annotation::BEGIN@17 which was called:
# once (11µs+129µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 17 # spent 140µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@17
# spent 129µs making 1 call to Exporter::import |
18 | 2 | 39µs | 2 | 1.47ms | # spent 742µs (10+732) within JSON::Schema::Modern::Annotation::BEGIN@18 which was called:
# once (10µs+732µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 18 # spent 742µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@18
# spent 732µs making 1 call to MooX::TypeTiny::import |
19 | 2 | 52µs | 2 | 1.36ms | # spent 686µs (11+675) within JSON::Schema::Modern::Annotation::BEGIN@19 which was called:
# once (11µs+675µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 19 # spent 686µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@19
# spent 675µs making 1 call to Exporter::Tiny::import |
20 | 2 | 365µs | 2 | 523µs | # spent 267µs (11+256) within JSON::Schema::Modern::Annotation::BEGIN@20 which was called:
# once (11µs+256µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 20 # spent 267µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@20
# spent 256µs making 1 call to namespace::clean::import |
21 | |||||
22 | 1 | 5µs | 2 | 2.25ms | has [qw( # spent 2.24ms making 1 call to JSON::Schema::Modern::Annotation::has
# spent 3µ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 | |||||
32 | has absolute_keyword_location => ( | ||||
33 | is => 'ro', | ||||
34 | isa => InstanceOf['Mojo::URL'], | ||||
35 | 71790 | 295ms | 71790 | 855ms | # spent 1.15s (298ms+855ms) within JSON::Schema::Modern::Annotation::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/JSON/Schema/Modern/Annotation.pm:35] which was called 71790 times, avg 16µs/call:
# 71790 times (298ms+855ms) by JSON::Schema::Modern::Annotation::new at line 65 of (eval 431)[Sub/Quote.pm:3], avg 16µs/call # spent 855ms making 71790 calls to Safe::Isa::__ANON__[Safe/Isa.pm:23], avg 12µs/call |
36 | 1 | 9µs | 2 | 591µs | ); # spent 493µs making 1 call to JSON::Schema::Modern::Annotation::has
# spent 98µ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 | ||||
39 | 1 | 3µs | 1 | 518µs | has annotation => ( # spent 518µs making 1 call to JSON::Schema::Modern::Annotation::has |
40 | is => 'ro', | ||||
41 | required => 1, | ||||
42 | ); | ||||
43 | |||||
44 | 1 | 4µs | 2 | 986µs | has unknown => ( # spent 985µs making 1 call to JSON::Schema::Modern::Annotation::has
# spent 1µs making 1 call to Types::Standard::Bool |
45 | is => 'ro', | ||||
46 | isa => Bool, | ||||
47 | default => 0, | ||||
48 | ); | ||||
49 | |||||
50 | sub 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 | |||||
61 | sub 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 | |||||
67 | 1 | 19µs | 1; | ||
68 | |||||
69 | 1 | 28µs | 1 | 321µs | __END__ # spent 321µs making 1 call to B::Hooks::EndOfScope::XS::__ANON__[B/Hooks/EndOfScope/XS.pm:26] |