Filename | /Users/ether/.perlbrew/libs/36.0@std/lib/perl5/JSON/Schema/Modern/Vocabulary.pm |
Statements | Executed 683026 statements in 1.47s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
41707 | 2 | 1 | 1.18s | 87.2s | eval_subschema_at_uri (recurses: max depth 38, inclusive time 966s) | JSON::Schema::Modern::Vocabulary::
49887 | 12 | 1 | 342ms | 87.2s | eval (recurses: max depth 34, inclusive time 867s) | JSON::Schema::Modern::Vocabulary::
402 | 3 | 2 | 17.2ms | 327ms | traverse_object_schemas (recurses: max depth 3, inclusive time 76.5ms) | JSON::Schema::Modern::Vocabulary::
562 | 10 | 3 | 4.40ms | 153ms | traverse_subschema (recurses: max depth 2, inclusive time 26.0ms) | JSON::Schema::Modern::Vocabulary::
76 | 3 | 1 | 2.19ms | 48.2ms | traverse_array_schemas (recurses: max depth 2, inclusive time 1.57ms) | JSON::Schema::Modern::Vocabulary::
402 | 1 | 1 | 417µs | 417µs | CORE:sort (opcode) | JSON::Schema::Modern::Vocabulary::
6 | 1 | 1 | 93µs | 895µs | traverse_property_schema | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 57µs | 62µs | BEGIN@1.305 | Moo::_Utils::
1 | 1 | 1 | 36µs | 50µs | BEGIN@15 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 33µs | 1.02ms | BEGIN@11 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 28µs | 28µs | BEGIN@19 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 23µs | 54µs | BEGIN@13 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 21µs | 21µs | BEGIN@9 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 18µs | 42µs | BEGIN@14 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 14µs | 27µs | BEGIN@16 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 13µs | 342µs | BEGIN@10 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 12µs | 157µs | BEGIN@12 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 10µs | 48µs | BEGIN@17 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 7µs | 170µs | BEGIN@20 | JSON::Schema::Modern::Vocabulary::
1 | 1 | 1 | 7µs | 41µs | BEGIN@2.306 | Moo::_Utils::
1 | 1 | 1 | 6µs | 25µs | BEGIN@18 | JSON::Schema::Modern::Vocabulary::
3 | 1 | 1 | 1µs | 1µ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 | 39µs | 2 | 67µs | # spent 62µs (57+5) within Moo::_Utils::BEGIN@1.305 which was called:
# once (57µs+5µs) by Moo::_Utils::_require at line 1 # spent 62µs making 1 call to Moo::_Utils::BEGIN@1.305
# spent 5µs making 1 call to strict::import |
2 | 2 | 55µs | 2 | 75µs | # spent 41µs (7+34) within Moo::_Utils::BEGIN@2.306 which was called:
# once (7µs+34µs) by Moo::_Utils::_require at line 2 # spent 41µs making 1 call to Moo::_Utils::BEGIN@2.306
# spent 34µ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.558'; | ||
8 | |||||
9 | 2 | 41µs | 1 | 21µs | # spent 21µs within JSON::Schema::Modern::Vocabulary::BEGIN@9 which was called:
# once (21µs+0s) by Moo::_Utils::_require at line 9 # spent 21µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@9 |
10 | 2 | 389µs | 2 | 363µs | # spent 342µs (13+329) within JSON::Schema::Modern::Vocabulary::BEGIN@10 which was called:
# once (13µs+329µs) by Moo::_Utils::_require at line 10 # spent 342µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@10
# spent 21µs making 1 call to Moo::Role::import |
11 | 3 | 129µs | 3 | 2.01ms | # spent 1.02ms (33µs+988µs) within JSON::Schema::Modern::Vocabulary::BEGIN@11 which was called:
# once (33µs+988µs) by Moo::_Utils::_require at line 11 # spent 1.02ms making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@11
# spent 962µs making 1 call to strictures::import
# spent 25µs making 1 call to strictures::VERSION |
12 | 2 | 54µs | 2 | 302µs | # spent 157µs (12+145) within JSON::Schema::Modern::Vocabulary::BEGIN@12 which was called:
# once (12µs+145µs) by Moo::_Utils::_require at line 12 # spent 157µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@12
# spent 145µs making 1 call to experimental::import |
13 | 2 | 40µs | 2 | 58µs | # spent 54µs (23+31) within JSON::Schema::Modern::Vocabulary::BEGIN@13 which was called:
# once (23µs+31µs) by Moo::_Utils::_require at line 13 # spent 54µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@13
# spent 4µs making 1 call to if::import |
14 | 2 | 41µs | 2 | 45µs | # spent 42µs (18+24) within JSON::Schema::Modern::Vocabulary::BEGIN@14 which was called:
# once (18µs+24µs) by Moo::_Utils::_require at line 14 # spent 42µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@14
# spent 3µs making 1 call to if::unimport |
15 | 2 | 21µs | 2 | 51µs | # spent 50µs (36+14) within JSON::Schema::Modern::Vocabulary::BEGIN@15 which was called:
# once (36µs+14µs) by Moo::_Utils::_require at line 15 # spent 50µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@15
# spent 1µs making 1 call to if::unimport |
16 | 2 | 51µs | 2 | 29µs | # spent 27µs (14+13) within JSON::Schema::Modern::Vocabulary::BEGIN@16 which was called:
# once (14µs+13µs) by Moo::_Utils::_require at line 16 # spent 27µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@16
# spent 2µs making 1 call to if::unimport |
17 | 3 | 36µs | 3 | 86µs | # spent 48µs (10+38) within JSON::Schema::Modern::Vocabulary::BEGIN@17 which was called:
# once (10µs+38µs) by Moo::_Utils::_require at line 17 # spent 48µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@17
# spent 29µs making 1 call to Exporter::import
# spent 9µs making 1 call to UNIVERSAL::VERSION |
18 | 2 | 14µs | 2 | 44µs | # spent 25µs (6+19) within JSON::Schema::Modern::Vocabulary::BEGIN@18 which was called:
# once (6µs+19µs) by Moo::_Utils::_require at line 18 # spent 25µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@18
# spent 19µs making 1 call to Exporter::import |
19 | 2 | 45µs | 1 | 28µs | # spent 28µs within JSON::Schema::Modern::Vocabulary::BEGIN@19 which was called:
# once (28µs+0s) by Moo::_Utils::_require at line 19 # spent 28µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@19 |
20 | 2 | 847µs | 2 | 333µs | # spent 170µs (7+163) within JSON::Schema::Modern::Vocabulary::BEGIN@20 which was called:
# once (7µs+163µs) by Moo::_Utils::_require at line 20 # spent 170µs making 1 call to JSON::Schema::Modern::Vocabulary::BEGIN@20
# spent 163µs making 1 call to namespace::clean::import |
21 | |||||
22 | 1 | 1µs | our @CARP_NOT = qw(JSON::Schema::Modern); | ||
23 | |||||
24 | 1 | 1µs | 1 | 42µs | requires qw(vocabulary keywords); # spent 42µs making 1 call to Moo::Role::requires |
25 | |||||
26 | 3 | 4µs | # spent 1µs within JSON::Schema::Modern::Vocabulary::evaluation_order which was called 3 times, avg 333ns/call:
# 3 times (1µs+0s) by JSON::Schema::Modern::Vocabulary::Core::CORE:sort at line 331 of JSON/Schema/Modern/Vocabulary/Core.pm, avg 333ns/call | ||
27 | |||||
28 | sub traverse ($self, $schema, $state) { | ||||
29 | $state->{evaluator}->_traverse_subschema($schema, $state); | ||||
30 | } | ||||
31 | |||||
32 | 2248 | 337µs | # spent 153ms (4.40+149) within JSON::Schema::Modern::Vocabulary::traverse_subschema which was called 562 times, avg 273µs/call:
# 156 times (1.39ms+2.33ms) by JSON::Schema::Modern::Vocabulary::Unevaluated::_traverse_keyword_unevaluatedProperties at line 101 of JSON/Schema/Modern/Vocabulary/Unevaluated.pm, avg 24µs/call
# 130 times (960µs+26.0ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_additionalProperties at line 438 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 207µs/call
# 98 times (881µs+86.4ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_items at line 246 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 891µs/call
# 65 times (361µs+16.8ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_then at line 139 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 264µs/call
# 65 times (430µs+9.67ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_if at line 138 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 155µs/call
# 15 times (84µs+2.91ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_else at line 140 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 200µs/call
# 15 times (154µs+926µ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 (100µs+3.48ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_propertyNames at line 473 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 256µs/call
# 3 times (24µs+204µs) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_contains at line 331 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 76µs/call
# once (9µs+63µs) by JSON::Schema::Modern::Vocabulary::Content::_traverse_keyword_contentSchema at line 99 of JSON/Schema/Modern/Vocabulary/Content.pm | ||
33 | $state->{evaluator}->_traverse_subschema($schema->{$state->{keyword}}, | ||||
34 | 562 | 4.16ms | 562 | 0s | +{ %$state, schema_path => $state->{schema_path}.'/'.$state->{keyword} }); # spent 175ms making 562 calls to JSON::Schema::Modern::_traverse_subschema, avg 311µs/call, recursion: max depth 6, sum of overlapping time 175ms |
35 | } | ||||
36 | |||||
37 | 304 | 112µs | # spent 48.2ms (2.19+46.1) within JSON::Schema::Modern::Vocabulary::traverse_array_schemas which was called 76 times, avg 635µs/call:
# 32 times (831µs+13.4ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_anyOf at line 88 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 444µs/call
# 23 times (816µs+20.7ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_allOf at line 68 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 934µs/call
# 21 times (541µs+12.0ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_oneOf at line 105 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 598µs/call | ||
38 | 76 | 82µs | 76 | 460µs | return if not assert_keyword_type($state, $schema, 'array'); # spent 460µs making 76 calls to JSON::Schema::Modern::Utilities::assert_keyword_type, avg 6µs/call |
39 | 76 | 81µs | return E($state, '%s array is empty', $state->{keyword}) if not $schema->{$state->{keyword}}->@*; | ||
40 | |||||
41 | 76 | 11µs | my $valid = 1; | ||
42 | 76 | 194µs | foreach my $idx (0 .. $schema->{$state->{keyword}}->$#*) { | ||
43 | $valid = 0 if not $state->{evaluator}->_traverse_subschema($schema->{$state->{keyword}}[$idx], | ||||
44 | 203 | 1.40ms | 203 | 0s | +{ %$state, schema_path => $state->{schema_path}.'/'.$state->{keyword}.'/'.$idx }); # spent 47.2ms making 203 calls to JSON::Schema::Modern::_traverse_subschema, avg 232µs/call, recursion: max depth 6, sum of overlapping time 47.2ms |
45 | } | ||||
46 | 76 | 159µs | return $valid; | ||
47 | } | ||||
48 | |||||
49 | 1608 | 280µs | # spent 327ms (17.2+310) within JSON::Schema::Modern::Vocabulary::traverse_object_schemas which was called 402 times, avg 813µs/call:
# 387 times (16.2ms+241ms) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_properties at line 363 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 665µs/call
# 12 times (910µs+68.6ms) by JSON::Schema::Modern::Vocabulary::Core::_traverse_keyword_defs at line 292 of JSON/Schema/Modern/Vocabulary/Core.pm, avg 5.79ms/call
# 3 times (43µs+-43µ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 | 511µs | 402 | 3.48ms | return if not assert_keyword_type($state, $schema, 'object'); # spent 3.48ms making 402 calls to JSON::Schema::Modern::Utilities::assert_keyword_type, avg 9µs/call |
51 | |||||
52 | 402 | 121µs | my $valid = 1; | ||
53 | 402 | 2.95ms | 402 | 417µs | foreach my $property (sort keys $schema->{$state->{keyword}}->%*) { # spent 417µ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 | 11.2ms | 2698 | 11.2ms | +{ %$state, schema_path => jsonp($state->{schema_path}, $state->{keyword}, $property) }); # spent 11.2ms making 1349 calls to JSON::Schema::Modern::Utilities::jsonp, avg 8µs/call
# spent 371ms making 1349 calls to JSON::Schema::Modern::_traverse_subschema, avg 275µs/call, recursion: max depth 6, sum of overlapping time 371ms |
56 | } | ||||
57 | 402 | 932µs | return $valid; | ||
58 | } | ||||
59 | |||||
60 | 30 | 5µs | # spent 895µs (93+802) within JSON::Schema::Modern::Vocabulary::traverse_property_schema which was called 6 times, avg 149µs/call:
# 6 times (93µs+802µs) by JSON::Schema::Modern::Vocabulary::Applicator::_traverse_keyword_patternProperties at line 402 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 149µs/call | ||
61 | 6 | 7µs | 6 | 34µs | return if not assert_keyword_type($state, $schema, 'object'); # spent 34µ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 | 42µs | 12 | 41µs | +{ %$state, schema_path => jsonp($state->{schema_path}, $state->{keyword}, $property) }); # spent 41µs making 6 calls to JSON::Schema::Modern::Utilities::jsonp, avg 7µs/call
# spent 727µs making 6 calls to JSON::Schema::Modern::_traverse_subschema, avg 121µs/call, recursion: max depth 2, sum of overlapping time 727µs |
65 | } | ||||
66 | |||||
67 | 249435 | 83.0ms | # spent 87.2s (342ms+86.8) within JSON::Schema::Modern::Vocabulary::eval which was called 49887 times, avg 1.75ms/call:
# 25750 times (147ms+-147ms) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_allOf at line 73 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 0s/call
# 10912 times (108ms+87.0s) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_properties at line 380 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 7.99ms/call
# 3013 times (18.2ms+-18.2ms) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_if at line 148 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 0s/call
# 2365 times (13.3ms+-8.84ms) 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.4ms+-10.4ms) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_if at line 154 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 0s/call
# 1835 times (13.6ms+-13.6ms) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_additionalProperties at line 457 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 0s/call
# 1443 times (17.0ms+-17.0ms) 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.47ms+-5.47ms) 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.10ms+-4.10ms) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_propertyNames at line 480 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 0s/call
# 610 times (2.84ms+-2.84ms) 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.26ms+-1.26ms) by JSON::Schema::Modern::Vocabulary::Applicator::_eval_keyword_dependentSchemas at line 167 of JSON/Schema/Modern/Vocabulary/Applicator.pm, avg 0s/call
# 4 times (24µs+-24µ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 | 235ms | 49887 | 0s | $state->{evaluator}->_eval_subschema($data, $schema, $state); # spent 954s making 49887 calls to JSON::Schema::Modern::_eval_subschema, avg 19.1ms/call, recursion: max depth 73, sum of overlapping time 954s |
69 | } | ||||
70 | |||||
71 | 250242 | 52.9ms | # spent 87.2s (1.18+86.0) within JSON::Schema::Modern::Vocabulary::eval_subschema_at_uri which was called 41707 times, avg 2.09ms/call:
# 39121 times (1.11s+86.1s) by JSON::Schema::Modern::Vocabulary::Core::_eval_keyword_ref at line 210 of JSON/Schema/Modern/Vocabulary/Core.pm, avg 2.23ms/call
# 2586 times (69.3ms+-69.3ms) by JSON::Schema::Modern::Vocabulary::Core::_eval_keyword_dynamicRef at line 252 of JSON/Schema/Modern/Vocabulary/Core.pm, avg 0s/call | ||
72 | 41707 | 114ms | 41707 | 21.1s | my $schema_info = $state->{evaluator}->_fetch_from_uri($uri); # spent 21.1s making 41707 calls to JSON::Schema::Modern::_fetch_from_uri, avg 506µs/call |
73 | 41707 | 12.8ms | 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 | 948ms | 83414 | 364ms | }); # spent 364ms making 41707 calls to JSON::Schema::Modern::Utilities::jsonp, avg 9µs/call
# spent 1030s making 41707 calls to JSON::Schema::Modern::_eval_subschema, avg 24.7ms/call, recursion: max depth 74, sum of overlapping time 1030s |
90 | } | ||||
91 | |||||
92 | 1 | 5µs | 1; | ||
93 | |||||
94 | 1 | 21µs | 1 | 287µs | __END__ # spent 287µs making 1 call to B::Hooks::EndOfScope::XS::__ANON__[B/Hooks/EndOfScope/XS.pm:26] |
# spent 417µs within JSON::Schema::Modern::Vocabulary::CORE:sort which was called 402 times, avg 1µs/call:
# 402 times (417µs+0s) by JSON::Schema::Modern::Vocabulary::traverse_object_schemas at line 53, avg 1µs/call |