Filename | /Users/ether/.perlbrew/libs/36.0@std/lib/perl5/JSON/Schema/Modern/Vocabulary.pm |
Statements | Executed 683026 statements in 1.40s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
41707 | 2 | 1 | 1.15s | 99.6s | eval_subschema_at_uri (recurses: max depth 38, inclusive time 1120s) | JSON::Schema::Modern::Vocabulary::
49887 | 12 | 1 | 294ms | 99.4s | eval (recurses: max depth 34, inclusive time 997s) | JSON::Schema::Modern::Vocabulary::
402 | 3 | 2 | 24.5ms | 389ms | traverse_object_schemas (recurses: max depth 3, inclusive time 97.3ms) | JSON::Schema::Modern::Vocabulary::
562 | 10 | 3 | 5.70ms | 179ms | traverse_subschema (recurses: max depth 2, inclusive time 29.7ms) | JSON::Schema::Modern::Vocabulary::
76 | 3 | 1 | 2.66ms | 57.3ms | traverse_array_schemas (recurses: max depth 2, inclusive time 2.51ms) | JSON::Schema::Modern::Vocabulary::
402 | 1 | 1 | 579µs | 579µs | CORE:sort (opcode) | JSON::Schema::Modern::Vocabulary::
6 | 1 | 1 | 79µs | 1.49ms | traverse_property_schema | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 60µs | 64µs | BEGIN@1.304 | Moo::_Utils::
1 | 1 | 1 | 39µs | 646µs | BEGIN@11 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 19µs | 46µs | BEGIN@13 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 17µs | 38µs | BEGIN@14 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 14µs | 28µs | BEGIN@15 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 14µs | 61µs | BEGIN@17 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 11µs | 456µs | BEGIN@10 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 11µs | 11µs | BEGIN@9 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 10µs | 52µs | BEGIN@18 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 9µs | 19µs | BEGIN@16 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 8µs | 319µs | BEGIN@20 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 7µs | 118µs | BEGIN@12 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 6µs | 33µs | BEGIN@2.305 | Moo::_Utils::
1 | 1 | 1 | 2µs | 2µs | BEGIN@19 | JSON::Schema::Modern::Vocabulary::
3 | 1 | 1 | 2µs | 2µs | evaluation_order | JSON::Schema::Modern::Vocabulary::
0 | 0 | 0 | 0s | 0s | traverse | JSON::Schema::Modern::Vocabulary::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | 2 | 198µs | 2 | 68µs | # spent 64µs (60+4) within Moo::_Utils::BEGIN@1.304 which was called:
# once (60µs+4µs) by Moo::_Utils::_require at line 1 # spent 64µs making 1 call to Moo::_Utils::BEGIN@1.304
# spent 4µs making 1 call to strict::import |
2 | 2 | 74µs | 2 | 60µs | # spent 33µs (6+27) within Moo::_Utils::BEGIN@2.305 which was called:
# once (6µs+27µs) by Moo::_Utils::_require at line 2 # spent 33µs making 1 call to Moo::_Utils::BEGIN@2.305
# spent 27µs making 1 call to warnings::import |
3 | package JSON::Schema::Modern::Vocabulary; | ||||
4 | # vim: set ts=8 sts=2 sw=2 tw=100 et : | ||||
5 | # ABSTRACT: Base role for JSON Schema vocabulary classes | ||||
6 | |||||
7 | 1 | 0s | our $VERSION = '0.556'; | ||
8 | |||||
9 | 2 | 33µs | 1 | 11µs | # spent 11µs within JSON::Schema::Modern::Vocabulary::BEGIN@9 which was called:
# once (11µs+0s) by Moo::_Utils::_require at line 9 # spent 11µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@9 |
10 | 2 | 28µs | 2 | 477µs | # spent 456µs (11+445) within JSON::Schema::Modern::Vocabulary::BEGIN@10 which was called:
# once (11µs+445µs) by Moo::_Utils::_require at line 10 # spent 456µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@10
# spent 21µs making 1 call to Moo::Role::import |
11 | 3 | 64µs | 3 | 1.25ms | # spent 646µs (39+607) within JSON::Schema::Modern::Vocabulary::BEGIN@11 which was called:
# once (39µs+607µs) by Moo::_Utils::_require at line 11 # spent 646µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@11
# spent 592µs making 1 call to strictures::import
# spent 14µs making 1 call to strictures::VERSION |
12 | 2 | 44µs | 2 | 229µs | # spent 118µs (7+111) within JSON::Schema::Modern::Vocabulary::BEGIN@12 which was called:
# once (7µs+111µs) by Moo::_Utils::_require at line 12 # spent 118µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@12
# spent 111µs making 1 call to experimental::import |
13 | 2 | 33µs | 2 | 50µs | # spent 46µs (19+27) within JSON::Schema::Modern::Vocabulary::BEGIN@13 which was called:
# once (19µs+27µs) by Moo::_Utils::_require at line 13 # spent 46µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@13
# spent 4µs making 1 call to if::import |
14 | 2 | 30µs | 2 | 39µs | # spent 38µs (17+21) within JSON::Schema::Modern::Vocabulary::BEGIN@14 which was called:
# once (17µs+21µs) by Moo::_Utils::_require at line 14 # spent 38µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@14
# spent 1µs making 1 call to if::unimport |
15 | 2 | 30µs | 2 | 29µs | # spent 28µs (14+14) within JSON::Schema::Modern::Vocabulary::BEGIN@15 which was called:
# once (14µs+14µs) by Moo::_Utils::_require at line 15 # spent 28µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@15
# spent 1µs making 1 call to if::unimport |
16 | 2 | 22µs | 2 | 21µs | # spent 19µs (9+10) within JSON::Schema::Modern::Vocabulary::BEGIN@16 which was called:
# once (9µs+10µs) by Moo::_Utils::_require at line 16 # spent 19µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@16
# spent 2µs making 1 call to if::unimport |
17 | 3 | 51µs | 3 | 108µs | # spent 61µs (14+47) within JSON::Schema::Modern::Vocabulary::BEGIN@17 which was called:
# once (14µs+47µs) by Moo::_Utils::_require at line 17 # spent 61µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@17
# spent 37µs making 1 call to Exporter::import
# spent 10µs making 1 call to UNIVERSAL::VERSION |
18 | 2 | 26µs | 2 | 94µs | # spent 52µs (10+42) within JSON::Schema::Modern::Vocabulary::BEGIN@18 which was called:
# once (10µs+42µs) by Moo::_Utils::_require at line 18 # spent 52µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@18
# spent 42µs making 1 call to Exporter::import |
19 | 2 | 19µs | 1 | 2µs | # spent 2µs within JSON::Schema::Modern::Vocabulary::BEGIN@19 which was called:
# once (2µs+0s) by Moo::_Utils::_require at line 19 # spent 2µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@19 |
20 | 2 | 607µs | 2 | 630µs | # spent 319µs (8+311) within JSON::Schema::Modern::Vocabulary::BEGIN@20 which was called:
# once (8µs+311µs) by Moo::_Utils::_require at line 20 # spent 319µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@20
# spent 311µs making 1 call to namespace::clean::import |
21 | |||||
22 | 1 | 1µs | our @CARP_NOT = qw(JSON::Schema::Modern); | ||
23 | |||||
24 | 1 | 2µs | 1 | 11µs | requires qw(vocabulary keywords); # spent 11µs making 1 call to Moo::Role::requires |
25 | |||||
26 | 3 | 6µs | # spent 2µs within JSON::Schema::Modern::Vocabulary::evaluation_order which was called 3 times, avg 667ns/call:
# 3 times (2µs+0s) by JSON::Schema::Modern::Vocabulary::Core::CORE:sort at line 331 of JSON/Schema/Modern/Vocabulary/Core.pm, avg 667ns/call | ||
27 | |||||
28 | sub traverse ($self, $schema, $state) { | ||||
29 | $state->{evaluator}->_traverse_subschema($schema, $state); | ||||
30 | } | ||||
31 | |||||
32 | 2248 | 440µs | # spent 179ms (5.70+173) within JSON::Schema::Modern::Vocabulary::traverse_subschema which was called 562 times, avg 318µs/call:
# 156 times (1.90ms+2.60ms) by JSON::Schema::Modern::Vocabulary::Unevaluated::_traverse_keyword_unevaluatedProperties at line 101 of JSON/Schema/Modern/Vocabulary/Unevaluated.pm, avg 29µs/call
# 130 times (1.26ms+30.4ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_additionalProperties at line 438 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 243µs/call
# 98 times (1.02ms+100ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_items at line 246 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 1.04ms/call
# 65 times (467µs+17.7ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_then at line 139 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 280µs/call
# 65 times (554µs+10.6ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_if at line 138 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 172µs/call
# 15 times (186µs+5.08ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_else at line 140 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 351µs/call
# 15 times (116µs+959µs) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_not at line 127 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 72µs/call
# 14 times (171µs+4.84ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_propertyNames at line 473 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 358µs/call
# 3 times (26µs+173µs) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_contains at line 331 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 66µs/call
# once (7µs+65µs) by JSON::Schema::Modern::Vocabulary::Content::_traverse_keyword_contentSchema at line 84 of JSON/Schema/Modern/Vocabulary/Content.pm | ||
33 | $state->{evaluator}->_traverse_subschema($schema->{$state->{keyword}}, | ||||
34 | 562 | 5.32ms | 562 | 0s | +{ %$state, schema_path => $state->{schema_path}.'/'.$state->{keyword} }); # spent 203ms making 562 calls to JSON::Schema::Modern::_traverse_subschema, avg 361µs/call, recursion: max depth 6, sum of overlapping time 203ms |
35 | } | ||||
36 | |||||
37 | 304 | 78µs | # spent 57.3ms (2.66+54.6) within JSON::Schema::Modern::Vocabulary::traverse_array_schemas which was called 76 times, avg 754µs/call:
# 32 times (958µs+12.7ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_anyOf at line 88 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 428µs/call
# 23 times (1.10ms+24.0ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_allOf at line 68 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 1.09ms/call
# 21 times (599µs+18.0ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_oneOf at line 105 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 883µs/call | ||
38 | 76 | 119µs | 76 | 493µs | return if not assert_keyword_type($state, $schema, 'array'); # spent 493µs making 76 calls to JSON::Schema::Modern::Utilities::assert_keyword_type, avg 6µs/call |
39 | 76 | 87µs | return E($state, '%s array is empty', $state->{keyword}) if not $schema->{$state->{keyword}}->@*; | ||
40 | |||||
41 | 76 | 16µs | my $valid = 1; | ||
42 | 76 | 157µs | foreach my $idx (0 .. $schema->{$state->{keyword}}->$#*) { | ||
43 | $valid = 0 if not $state->{evaluator}->_traverse_subschema($schema->{$state->{keyword}}[$idx], | ||||
44 | 203 | 1.60ms | 203 | 0s | +{ %$state, schema_path => $state->{schema_path}.'/'.$state->{keyword}.'/'.$idx }); # spent 56.7ms making 203 calls to JSON::Schema::Modern::_traverse_subschema, avg 279µs/call, recursion: max depth 6, sum of overlapping time 56.7ms |
45 | } | ||||
46 | 76 | 215µs | return $valid; | ||
47 | } | ||||
48 | |||||
49 | 1608 | 515µs | # spent 389ms (24.5+365) within JSON::Schema::Modern::Vocabulary::traverse_object_schemas which was called 402 times, avg 968µs/call:
# 387 times (23.5ms+275ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_properties at line 363 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 772µs/call
# 12 times (931µs+89.4ms) by JSON::Schema::Modern::Vocabulary::Core::_traverse_keyword_defs at line 292 of JSON/Schema/Modern/Vocabulary/Core.pm, avg 7.53ms/call
# 3 times (46µs+-46µs) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_dependentSchemas at line 158 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 0s/call | ||
50 | 402 | 974µs | 402 | 4.21ms | return if not assert_keyword_type($state, $schema, 'object'); # spent 4.21ms making 402 calls to JSON::Schema::Modern::Utilities::assert_keyword_type, avg 10µs/call |
51 | |||||
52 | 402 | 114µs | my $valid = 1; | ||
53 | 402 | 3.31ms | 402 | 579µs | foreach my $property (sort keys $schema->{$state->{keyword}}->%*) { # spent 579µs making 402 calls to JSON::Schema::Modern::Vocabulary::CORE:sort, avg 1µs/call |
54 | $valid = 0 if not $state->{evaluator}->_traverse_subschema($schema->{$state->{keyword}}{$property}, | ||||
55 | 1349 | 15.3ms | 2698 | 15.7ms | +{ %$state, schema_path => jsonp($state->{schema_path}, $state->{keyword}, $property) }); # spent 15.7ms making 1349 calls to JSON::Schema::Modern::Utilities::jsonp, avg 12µs/call
# spent 441ms making 1349 calls to JSON::Schema::Modern::_traverse_subschema, avg 327µs/call, recursion: max depth 6, sum of overlapping time 441ms |
56 | } | ||||
57 | 402 | 1.23ms | return $valid; | ||
58 | } | ||||
59 | |||||
60 | 30 | 6µs | # spent 1.49ms (79µs+1.41) within JSON::Schema::Modern::Vocabulary::traverse_property_schema which was called 6 times, avg 248µs/call:
# 6 times (79µs+1.41ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_patternProperties at line 402 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 248µs/call | ||
61 | 6 | 9µs | 6 | 35µs | return if not assert_keyword_type($state, $schema, 'object'); # spent 35µs making 6 calls to JSON::Schema::Modern::Utilities::assert_keyword_type, avg 6µs/call |
62 | |||||
63 | $state->{evaluator}->_traverse_subschema($schema->{$state->{keyword}}{$property}, | ||||
64 | 6 | 52µs | 12 | 56µs | +{ %$state, schema_path => jsonp($state->{schema_path}, $state->{keyword}, $property) }); # spent 56µs making 6 calls to JSON::Schema::Modern::Utilities::jsonp, avg 9µs/call
# spent 1.32ms making 6 calls to JSON::Schema::Modern::_traverse_subschema, avg 220µs/call, recursion: max depth 2, sum of overlapping time 1.32ms |
65 | } | ||||
66 | |||||
67 | 249435 | 62.7ms | # spent 99.4s (294ms+99.1) within JSON::Schema::Modern::Vocabulary::eval which was called 49887 times, avg 1.99ms/call:
# 25750 times (142ms+-142ms) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_allOf at line 73 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 0s/call
# 10912 times (76.9ms+99.3s) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_properties at line 380 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 9.11ms/call
# 3013 times (16.4ms+-16.4ms) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_if at line 148 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 0s/call
# 2365 times (12.4ms+-7.79ms) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_anyOf at line 95 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 2µs/call
# 2214 times (10.1ms+-10.1ms) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_if at line 154 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 0s/call
# 1835 times (11.9ms+-11.9ms) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_additionalProperties at line 457 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 0s/call
# 1443 times (9.41ms+-9.41ms) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword__items_schema at line 312 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 0s/call
# 738 times (5.89ms+-5.89ms) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_patternProperties at line 421 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 0s/call
# 713 times (4.22ms+-4.22ms) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_propertyNames at line 480 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 0s/call
# 610 times (3.23ms+-3.23ms) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_oneOf at line 111 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 0s/call
# 290 times (1.44ms+-1.44ms) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_dependentSchemas at line 167 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 0s/call
# 4 times (23µs+-23µs) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_not at line 133 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 0s/call | ||
68 | 49887 | 252ms | 49887 | 0s | $state->{evaluator}->_eval_subschema($data, $schema, $state); # spent 1096s making 49887 calls to JSON::Schema::Modern::_eval_subschema, avg 22.0ms/call, recursion: max depth 73, sum of overlapping time 1096s |
69 | } | ||||
70 | |||||
71 | 250242 | 53.1ms | # spent 99.6s (1.15+98.4) within JSON::Schema::Modern::Vocabulary::eval_subschema_at_uri which was called 41707 times, avg 2.39ms/call:
# 39121 times (1.08s+98.5s) by JSON::Schema::Modern::Vocabulary::Core::_eval_keyword_ref at line 210 of JSON/Schema/Modern/Vocabulary/Core.pm, avg 2.55ms/call
# 2586 times (70.5ms+-70.5ms) by JSON::Schema::Modern::Vocabulary::Core::_eval_keyword_dynamicRef at line 252 of JSON/Schema/Modern/Vocabulary/Core.pm, avg 0s/call | ||
72 | 41707 | 104ms | 41707 | 20.2s | my $schema_info = $state->{evaluator}->_fetch_from_uri($uri); # spent 20.2s making 41707 calls to JSON::Schema::Modern::_fetch_from_uri, avg 485µs/call |
73 | 41707 | 13.6ms | abort($state, 'EXCEPTION: unable to find resource %s', $uri) if not $schema_info; | ||
74 | |||||
75 | return $state->{evaluator}->_eval_subschema($data, $schema_info->{schema}, | ||||
76 | +{ | ||||
77 | $schema_info->{configs}->%*, | ||||
78 | %$state, | ||||
79 | traversed_schema_path => $state->{traversed_schema_path}.$state->{schema_path} | ||||
80 | .jsonp('', $state->{keyword}, exists $state->{_schema_path_suffix} | ||||
81 | ? (is_plain_arrayref($state->{_schema_path_suffix}) ? $state->{_schema_path_suffix}->@* : $state->{_schema_path_suffix}) | ||||
82 | : ()), | ||||
83 | initial_schema_uri => $schema_info->{canonical_uri}, | ||||
84 | document => $schema_info->{document}, | ||||
85 | document_path => $schema_info->{document_path}, | ||||
86 | spec_version => $schema_info->{specification_version}, | ||||
87 | schema_path => '', | ||||
88 | vocabularies => $schema_info->{vocabularies}, # reference, not copy | ||||
89 | 41707 | 888ms | 83414 | 329ms | }); # spent 329ms making 41707 calls to JSON::Schema::Modern::Utilities::jsonp, avg 8µs/call
# spent 1198s making 41707 calls to JSON::Schema::Modern::_eval_subschema, avg 28.7ms/call, recursion: max depth 74, sum of overlapping time 1198s |
90 | } | ||||
91 | |||||
92 | 1 | 7µs | 1; | ||
93 | |||||
94 | 1 | 28µs | 1 | 299µs | __END__ # spent 299µs making 1 call to B::Hooks::EndOfScope::XS::__ANON__[B/Hooks/EndOfScope/XS.pm:26] |
# spent 579µs within JSON::Schema::Modern::Vocabulary::CORE:sort which was called 402 times, avg 1µs/call:
# 402 times (579µs+0s) by JSON::Schema::Modern::Vocabulary::traverse_object_schemas at line 53, avg 1µs/call |