← Index
NYTProf Performance Profile   « line view »
For ../prof.pl
  Run on Wed Dec 14 15:57:08 2022
Reported on Wed Dec 14 16:00:34 2022

Filename/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/JSON/Schema/Modern/Annotation.pm
StatementsExecuted 71825 statements in 296ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
7179011298ms1.15sJSON::Schema::Modern::Annotation::::__ANON__[:35]JSON::Schema::Modern::Annotation::__ANON__[:35]
11152µs59µsJSON::Schema::Modern::Result::::BEGIN@1 JSON::Schema::Modern::Result::BEGIN@1
11129µs1.13msJSON::Schema::Modern::Annotation::::BEGIN@11JSON::Schema::Modern::Annotation::BEGIN@11
11122µs60µsJSON::Schema::Modern::Annotation::::BEGIN@13JSON::Schema::Modern::Annotation::BEGIN@13
11116µs708µsJSON::Schema::Modern::Annotation::::BEGIN@10JSON::Schema::Modern::Annotation::BEGIN@10
11116µs16µsJSON::Schema::Modern::Annotation::::BEGIN@9JSON::Schema::Modern::Annotation::BEGIN@9
11114µs29µsJSON::Schema::Modern::Annotation::::BEGIN@16JSON::Schema::Modern::Annotation::BEGIN@16
11113µs34µsJSON::Schema::Modern::Annotation::::BEGIN@14JSON::Schema::Modern::Annotation::BEGIN@14
11113µs34µsJSON::Schema::Modern::Annotation::::BEGIN@15JSON::Schema::Modern::Annotation::BEGIN@15
11111µs140µsJSON::Schema::Modern::Annotation::::BEGIN@17JSON::Schema::Modern::Annotation::BEGIN@17
11111µs686µsJSON::Schema::Modern::Annotation::::BEGIN@19JSON::Schema::Modern::Annotation::BEGIN@19
11111µs267µsJSON::Schema::Modern::Annotation::::BEGIN@20JSON::Schema::Modern::Annotation::BEGIN@20
11110µs139µsJSON::Schema::Modern::Annotation::::BEGIN@12JSON::Schema::Modern::Annotation::BEGIN@12
11110µs742µsJSON::Schema::Modern::Annotation::::BEGIN@18JSON::Schema::Modern::Annotation::BEGIN@18
1118µs66µ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
1252µs266µ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
use strict;
# spent 59µs making 1 call to JSON::Schema::Modern::Result::BEGIN@1 # spent 7µs making 1 call to strict::import
2262µs2124µ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
use warnings;
# spent 66µs making 1 call to JSON::Schema::Modern::Result::BEGIN@2 # spent 58µ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
710sour $VERSION = '0.556';
8
9261µs116µ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
use 5.020;
# spent 16µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@9
10266µs21.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
use Moo;
# spent 708µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@10 # spent 692µs making 1 call to Moo::import
11381µs32.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
use strictures 2;
# 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
12275µs2268µ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
use experimental qw(signatures postderef);
# spent 139µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@12 # spent 129µs making 1 call to experimental::import
13250µs265µ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
use if "$]" >= 5.022, experimental => 're_strict';
# spent 60µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@13 # spent 5µs making 1 call to if::import
14282µs235µ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
no if "$]" >= 5.031009, feature => 'indirect';
# spent 34µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@14 # spent 1µs making 1 call to if::unimport
15238µs237µ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
no if "$]" >= 5.033001, feature => 'multidimensional';
# spent 34µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@15 # spent 3µs making 1 call to if::unimport
16233µs229µ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
no if "$]" >= 5.033006, feature => 'bareword_filehandles';
# spent 29µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@16 # spent 0s making 1 call to if::unimport
17232µs2269µ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
use Safe::Isa;
# spent 140µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@17 # spent 129µs making 1 call to Exporter::import
18239µs21.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
use MooX::TypeTiny;
# spent 742µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@18 # spent 732µs making 1 call to MooX::TypeTiny::import
19252µs21.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
use Types::Standard qw(Str InstanceOf Bool);
# spent 686µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@19 # spent 675µs making 1 call to Exporter::Tiny::import
202365µs2523µ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
use namespace::clean;
# spent 267µs making 1 call to JSON::Schema::Modern::Annotation::BEGIN@20 # spent 256µs making 1 call to namespace::clean::import
21
2215µs22.25mshas [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
32has absolute_keyword_location => (
33 is => 'ro',
34 isa => InstanceOf['Mojo::URL'],
3571790295ms71790855ms
# 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
coerce => sub { $_[0]->$_isa('Mojo::URL') ? $_[0] : Mojo::URL->new($_[0]) },
# spent 855ms making 71790 calls to Safe::Isa::__ANON__[Safe/Isa.pm:23], avg 12µs/call
3619µs2591µ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
3913µs1518µshas annotation => (
# spent 518µs making 1 call to JSON::Schema::Modern::Annotation::has
40 is => 'ro',
41 required => 1,
42);
43
4414µs2986µshas 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
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
67119µs1;
68
69128µs1321µs__END__