| Filename | /Users/ether/.perlbrew/libs/36.0@std/lib/perl5/JSON/Schema/Modern/Annotation.pm |
| Statements | Executed 72072 statements in 240ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 72037 | 1 | 1 | 266ms | 1.05s | JSON::Schema::Modern::Annotation::__ANON__[:35] |
| 1 | 1 | 1 | 35µs | 38µs | JSON::Schema::Modern::Result::BEGIN@1 |
| 1 | 1 | 1 | 20µs | 883µs | JSON::Schema::Modern::Annotation::BEGIN@11 |
| 1 | 1 | 1 | 16µs | 42µs | JSON::Schema::Modern::Annotation::BEGIN@13 |
| 1 | 1 | 1 | 12µs | 35µs | JSON::Schema::Modern::Annotation::BEGIN@14 |
| 1 | 1 | 1 | 12µs | 26µs | JSON::Schema::Modern::Annotation::BEGIN@15 |
| 1 | 1 | 1 | 12µs | 230µs | JSON::Schema::Modern::Annotation::BEGIN@20 |
| 1 | 1 | 1 | 12µs | 12µs | JSON::Schema::Modern::Annotation::BEGIN@9 |
| 1 | 1 | 1 | 11µs | 29µs | JSON::Schema::Modern::Annotation::BEGIN@16 |
| 1 | 1 | 1 | 11µs | 609µs | JSON::Schema::Modern::Annotation::BEGIN@19 |
| 1 | 1 | 1 | 10µs | 121µs | JSON::Schema::Modern::Annotation::BEGIN@17 |
| 1 | 1 | 1 | 9µs | 469µs | JSON::Schema::Modern::Annotation::BEGIN@18 |
| 1 | 1 | 1 | 8µs | 124µs | JSON::Schema::Modern::Annotation::BEGIN@12 |
| 1 | 1 | 1 | 7µs | 304µs | JSON::Schema::Modern::Annotation::BEGIN@10 |
| 1 | 1 | 1 | 7µs | 37µs | JSON::Schema::Modern::Result::BEGIN@2 |
| 0 | 0 | 0 | 0s | 0s | JSON::Schema::Modern::Annotation::TO_JSON |
| 0 | 0 | 0 | 0s | 0s | JSON::Schema::Modern::Annotation::dump |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | 2 | 34µs | 2 | 41µ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 # spent 38µs making 1 call to JSON::Schema::Modern::Result::BEGIN@1
# spent 3µs making 1 call to strict::import |
| 2 | 2 | 44µs | 2 | 67µ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 # spent 37µs making 1 call to JSON::Schema::Modern::Result::BEGIN@2
# spent 30µ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 | 1µs | our $VERSION = '0.552'; | ||
| 8 | |||||
| 9 | 2 | 44µs | 1 | 12µ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 # spent 12µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@9 |
| 10 | 2 | 29µs | 2 | 601µ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 # spent 304µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@10
# spent 297µs making 1 call to Moo::import |
| 11 | 3 | 36µs | 3 | 1.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 # 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 |
| 12 | 2 | 38µs | 2 | 240µ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 # spent 124µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@12
# spent 116µs making 1 call to experimental::import |
| 13 | 2 | 45µs | 2 | 43µ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 # spent 42µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@13
# spent 1µs making 1 call to if::import |
| 14 | 2 | 31µs | 2 | 38µ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 # spent 35µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@14
# spent 3µs making 1 call to if::unimport |
| 15 | 2 | 28µs | 2 | 27µ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 # spent 26µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@15
# spent 1µs making 1 call to if::unimport |
| 16 | 2 | 21µs | 2 | 30µ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 # spent 29µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@16
# spent 1µs making 1 call to if::unimport |
| 17 | 2 | 28µs | 2 | 232µ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 # spent 121µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@17
# spent 111µs making 1 call to Exporter::import |
| 18 | 2 | 31µs | 2 | 929µ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 # spent 469µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@18
# spent 460µs making 1 call to MooX::TypeTiny::import |
| 19 | 2 | 33µs | 2 | 1.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 # spent 609µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@19
# spent 598µs making 1 call to Exporter::Tiny::import |
| 20 | 2 | 317µs | 2 | 448µ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 # spent 230µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@20
# spent 218µs making 1 call to namespace::clean::import |
| 21 | |||||
| 22 | 1 | 4µs | 2 | 2.25ms | has [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 | |||||
| 32 | has absolute_keyword_location => ( | ||||
| 33 | is => 'ro', | ||||
| 34 | isa => InstanceOf['Mojo::URL'], | ||||
| 35 | 72037 | 239ms | 72037 | 782ms | # 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 # spent 782ms making 72037 calls to Safe::Isa::__ANON__[Safe/Isa.pm:23], avg 11µs/call |
| 36 | 1 | 12µs | 2 | 549µ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 | ||||
| 39 | 1 | 1µs | 1 | 390µs | has annotation => ( # spent 390µs making 1 call to JSON::Schema::Modern::Annotation::has |
| 40 | is => 'ro', | ||||
| 41 | required => 1, | ||||
| 42 | ); | ||||
| 43 | |||||
| 44 | 1 | 4µs | 2 | 786µs | has 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 | |||||
| 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 | 17µs | 1; | ||
| 68 | |||||
| 69 | 1 | 22µs | 1 | 299µs | __END__ # spent 299µs making 1 call to B::Hooks::EndOfScope::XS::__ANON__[B/Hooks/EndOfScope/XS.pm:26] |