Skip to content

Commit

Permalink
Extract BundleOptions::WithoutIdentifiers into its own `unidentify(…
Browse files Browse the repository at this point in the history
…)` (#1429)

Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti authored Jan 10, 2025
1 parent 16adce4 commit 55481f3
Show file tree
Hide file tree
Showing 13 changed files with 851 additions and 488 deletions.
2 changes: 1 addition & 1 deletion src/jsonschema/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ noa_library(NAMESPACE sourcemeta PROJECT jsontoolkit NAME jsonschema
walker.h reference.h frame.h error.h unevaluated.h keywords.h
SOURCES jsonschema.cc default_walker.cc frame.cc
anchor.cc resolver.cc walker.cc bundle.cc
unevaluated.cc relativize.cc
unevaluated.cc relativize.cc unidentify.cc
"${CMAKE_CURRENT_BINARY_DIR}/official_resolver.cc")

if(JSONTOOLKIT_INSTALL)
Expand Down
60 changes: 2 additions & 58 deletions src/jsonschema/bundle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,82 +127,26 @@ auto bundle_schema(sourcemeta::jsontoolkit::JSON &root,
}
}

auto remove_identifiers(sourcemeta::jsontoolkit::JSON &schema,
const sourcemeta::jsontoolkit::SchemaWalker &walker,
const sourcemeta::jsontoolkit::SchemaResolver &resolver,
const std::optional<std::string> &default_dialect)
-> void {
// (1) Re-frame before changing anything
sourcemeta::jsontoolkit::Frame frame;
frame.analyse(schema, walker, resolver, default_dialect);

// (2) Remove all identifiers and anchors
for (const auto &entry : sourcemeta::jsontoolkit::SchemaIterator{
schema, walker, resolver, default_dialect}) {
auto &subschema{sourcemeta::jsontoolkit::get(schema, entry.pointer)};
if (subschema.is_boolean()) {
continue;
}

assert(entry.base_dialect.has_value());
sourcemeta::jsontoolkit::anonymize(subschema, entry.base_dialect.value());

if (entry.vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/core")) {
subschema.erase("$anchor");
subschema.erase("$dynamicAnchor");
}

if (entry.vocabularies.contains(
"https://json-schema.org/draft/2019-09/vocab/core")) {
subschema.erase("$anchor");
subschema.erase("$recursiveAnchor");
}
}

// (3) Fix-up reference based on pointers from the root
for (const auto &[key, reference] : frame.references()) {
// We don't want to bundle official schemas, as we can expect
// virtually all implementations to understand them out of the box
if (is_official_metaschema_reference(key.second, reference.destination)) {
continue;
}

const auto result{frame.traverse(reference.destination)};
assert(result.has_value());
sourcemeta::jsontoolkit::set(
schema, key.second,
sourcemeta::jsontoolkit::JSON{
sourcemeta::jsontoolkit::to_uri(result.value().get().pointer)
.recompose()});
}
}

} // namespace

namespace sourcemeta::jsontoolkit {

auto bundle(sourcemeta::jsontoolkit::JSON &schema, const SchemaWalker &walker,
const SchemaResolver &resolver, const BundleOptions options,
const SchemaResolver &resolver,
const std::optional<std::string> &default_dialect) -> void {
const auto vocabularies{
sourcemeta::jsontoolkit::vocabularies(schema, resolver, default_dialect)};
sourcemeta::jsontoolkit::Frame frame;
bundle_schema(schema, definitions_keyword(vocabularies), schema, frame,
walker, resolver, default_dialect);

if (options == BundleOptions::WithoutIdentifiers) {
remove_identifiers(schema, walker, resolver, default_dialect);
}
}

auto bundle(const sourcemeta::jsontoolkit::JSON &schema,
const SchemaWalker &walker, const SchemaResolver &resolver,
const BundleOptions options,
const std::optional<std::string> &default_dialect)
-> sourcemeta::jsontoolkit::JSON {
sourcemeta::jsontoolkit::JSON copy = schema;
bundle(copy, walker, resolver, options, default_dialect);
bundle(copy, walker, resolver, default_dialect);
return copy;
}

Expand Down
40 changes: 37 additions & 3 deletions src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,15 @@ auto schema_format_compare(const JSON::String &left, const JSON::String &right)
/// #include <sourcemeta/jsontoolkit/jsonschema.h>
/// #include <cassert>
///
/// sourcemeta::jsontoolkit::JSON document =
/// sourcemeta::jsontoolkit::JSON schema =
/// sourcemeta::jsontoolkit::parse(R"JSON({
/// "$id": "https://www.example.com/schema",
/// "$schema": "https://json-schema.org/draft/2020-12/schema",
/// "$ref": "https://www.example.com/another",
/// })JSON");
///
/// sourcemeta::jsontoolkit::relativize(schema,
/// sourcemeta::jsontoolkit::default_dialect,
/// sourcemeta::jsontoolkit::default_walker,
/// sourcemeta::jsontoolkit::official_resolver);
///
/// const sourcemeta::jsontoolkit::JSON expected =
Expand All @@ -350,14 +350,48 @@ auto schema_format_compare(const JSON::String &left, const JSON::String &right)
/// "$ref": "another",
/// })JSON");
///
/// assert(document == expected);
/// assert(schema == expected);
/// ```
SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT
auto relativize(
JSON &schema, const SchemaWalker &walker, const SchemaResolver &resolver,
const std::optional<std::string> &default_dialect = std::nullopt,
const std::optional<std::string> &default_id = std::nullopt) -> void;

/// @ingroup jsonschema
///
/// Remove every identifer from a schema, rephrasing references (if any) as
/// needed. For example:
///
/// ```cpp
/// #include <sourcemeta/jsontoolkit/json.h>
/// #include <sourcemeta/jsontoolkit/jsonschema.h>
/// #include <cassert>
///
/// sourcemeta::jsontoolkit::JSON schema =
/// sourcemeta::jsontoolkit::parse(R"JSON({
/// "$id": "https://www.example.com/schema",
/// "$schema": "https://json-schema.org/draft/2020-12/schema",
/// "$ref": "another",
/// })JSON");
///
/// sourcemeta::jsontoolkit::unidentify(schema,
/// sourcemeta::jsontoolkit::default_walker,
/// sourcemeta::jsontoolkit::official_resolver);
///
/// const sourcemeta::jsontoolkit::JSON expected =
/// sourcemeta::jsontoolkit::parse(R"JSON({
/// "$schema": "https://json-schema.org/draft/2020-12/schema",
/// "$ref": "https://www.example.com/another",
/// })JSON");
///
/// assert(schema == expected);
/// ```
SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT
auto unidentify(
JSON &schema, const SchemaWalker &walker, const SchemaResolver &resolver,
const std::optional<std::string> &default_dialect = std::nullopt) -> void;

} // namespace sourcemeta::jsontoolkit

#endif
16 changes: 0 additions & 16 deletions src/jsonschema/include/sourcemeta/jsontoolkit/jsonschema_bundle.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,6 @@ namespace sourcemeta::jsontoolkit {

// TODO: Optionally let users bundle the metaschema too

/// @ingroup jsonschema
/// A set of options that modify the behavior of bundling
enum class BundleOptions : std::uint8_t {
/// Perform standard JSON Schema bundling
Default,

/// Perform standard JSON Schema bundling but without making
/// use of identifiers. This is helpful for delivering
/// schemas to some non-compliant implementations that do not
/// recognize identifiers (like Visua Studio Code at the time
/// of this writing)
WithoutIdentifiers
};

/// @ingroup jsonschema
///
/// This function bundles a JSON Schema (starting from Draft 4) by embedding
Expand Down Expand Up @@ -83,7 +69,6 @@ enum class BundleOptions : std::uint8_t {
SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT
auto bundle(sourcemeta::jsontoolkit::JSON &schema, const SchemaWalker &walker,
const SchemaResolver &resolver,
const BundleOptions options = BundleOptions::Default,
const std::optional<std::string> &default_dialect = std::nullopt)
-> void;

Expand Down Expand Up @@ -141,7 +126,6 @@ auto bundle(sourcemeta::jsontoolkit::JSON &schema, const SchemaWalker &walker,
SOURCEMETA_JSONTOOLKIT_JSONSCHEMA_EXPORT
auto bundle(const sourcemeta::jsontoolkit::JSON &schema,
const SchemaWalker &walker, const SchemaResolver &resolver,
const BundleOptions options = BundleOptions::Default,
const std::optional<std::string> &default_dialect = std::nullopt)
-> sourcemeta::jsontoolkit::JSON;

Expand Down
49 changes: 49 additions & 0 deletions src/jsonschema/unidentify.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#include <sourcemeta/jsontoolkit/jsonschema.h>

namespace sourcemeta::jsontoolkit {

auto unidentify(JSON &schema, const SchemaWalker &walker,
const SchemaResolver &resolver,
const std::optional<std::string> &default_dialect) -> void {
// (1) Re-frame before changing anything
Frame frame;
frame.analyse(schema, walker, resolver, default_dialect);

// (2) Remove all identifiers and anchors
for (const auto &entry :
SchemaIterator{schema, walker, resolver, default_dialect}) {
auto &subschema{get(schema, entry.pointer)};
if (subschema.is_boolean()) {
continue;
}

assert(entry.base_dialect.has_value());
anonymize(subschema, entry.base_dialect.value());

if (entry.vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/core")) {
subschema.erase("$anchor");
subschema.erase("$dynamicAnchor");
}

if (entry.vocabularies.contains(
"https://json-schema.org/draft/2019-09/vocab/core")) {
subschema.erase("$anchor");
subschema.erase("$recursiveAnchor");
}
}

// (3) Fix-up reference based on pointers from the root
for (const auto &[key, reference] : frame.references()) {
const auto result{frame.traverse(reference.destination)};
if (result.has_value()) {
set(schema, key.second,
JSON{to_uri(result.value().get().pointer).recompose()});
} else if (!key.second.empty() && key.second.back().is_property() &&
key.second.back().to_property() != "$schema") {
set(schema, key.second, JSON{reference.destination});
}
}
}

} // namespace sourcemeta::jsontoolkit
1 change: 1 addition & 0 deletions test/jsonschema/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ add_executable(sourcemeta_jsontoolkit_jsonschema_unit
jsonschema_bundle_draft1_test.cc
jsonschema_bundle_draft0_test.cc
jsonschema_bundle_test.cc
jsonschema_unidentify_test.cc
jsonschema_metaschema_test.cc
jsonschema_dialect_test.cc
jsonschema_dialect_2020_12_test.cc
Expand Down
84 changes: 0 additions & 84 deletions test/jsonschema/jsonschema_bundle_2019_09_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,6 @@ TEST(JSONSchema_bundle_2019_09, anonymous_no_dialect) {

sourcemeta::jsontoolkit::bundle(
document, sourcemeta::jsontoolkit::default_schema_walker, test_resolver,
sourcemeta::jsontoolkit::BundleOptions::Default,
"https://json-schema.org/draft/2019-09/schema");

const sourcemeta::jsontoolkit::JSON expected =
Expand All @@ -466,59 +465,6 @@ TEST(JSONSchema_bundle_2019_09, anonymous_no_dialect) {
EXPECT_EQ(document, expected);
}

TEST(JSONSchema_bundle_2019_09, without_id) {
sourcemeta::jsontoolkit::JSON document =
sourcemeta::jsontoolkit::parse(R"JSON({
"$id": "https://www.sourcemeta.com/top-level",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"properties": {
"foo": {
"$ref": "recursive#/properties/foo"
},
"baz": {
"$ref": "https://example.com/baz-anchor#baz"
}
}
})JSON");

sourcemeta::jsontoolkit::bundle(
document, sourcemeta::jsontoolkit::default_schema_walker, test_resolver,
sourcemeta::jsontoolkit::BundleOptions::WithoutIdentifiers);

const sourcemeta::jsontoolkit::JSON expected =
sourcemeta::jsontoolkit::parse(R"JSON({
"$schema": "https://json-schema.org/draft/2019-09/schema",
"properties": {
"foo": {
"$ref": "#/$defs/https%3A~1~1www.sourcemeta.com~1recursive/properties/foo"
},
"baz": {
"$ref": "#/$defs/https%3A~1~1example.com~1baz-anchor/$defs/baz"
}
},
"$defs": {
"https://www.sourcemeta.com/recursive": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"properties": {
"foo": {
"$ref": "#/$defs/https%3A~1~1www.sourcemeta.com~1recursive"
}
}
},
"https://example.com/baz-anchor": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$defs": {
"baz": {
"type": "string"
}
}
}
}
})JSON");

EXPECT_EQ(document, expected);
}

TEST(JSONSchema_bundle_2019_09, metaschema) {
sourcemeta::jsontoolkit::JSON document =
sourcemeta::jsontoolkit::parse(R"JSON({
Expand Down Expand Up @@ -550,36 +496,6 @@ TEST(JSONSchema_bundle_2019_09, metaschema) {
EXPECT_EQ(document, expected);
}

TEST(JSONSchema_bundle_2019_09, metaschema_without_id) {
sourcemeta::jsontoolkit::JSON document =
sourcemeta::jsontoolkit::parse(R"JSON({
"$schema": "https://example.com/meta/1.json",
"type": "string"
})JSON");

sourcemeta::jsontoolkit::bundle(
document, sourcemeta::jsontoolkit::default_schema_walker, test_resolver,
sourcemeta::jsontoolkit::BundleOptions::WithoutIdentifiers);

const sourcemeta::jsontoolkit::JSON expected =
sourcemeta::jsontoolkit::parse(R"JSON({
"$schema": "#/$defs/https%3A~1~1example.com~1meta~11.json",
"type": "string",
"$defs": {
"https://example.com/meta/1.json": {
"$schema": "#/$defs/https%3A~1~1example.com~1meta~12.json",
"$vocabulary": { "https://json-schema.org/draft/2019-09/vocab/core": true }
},
"https://example.com/meta/2.json": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$vocabulary": { "https://json-schema.org/draft/2019-09/vocab/core": true }
}
}
})JSON");

EXPECT_EQ(document, expected);
}

TEST(JSONSchema_bundle_2019_09, relative_base_uri_with_ref) {
sourcemeta::jsontoolkit::JSON document =
sourcemeta::jsontoolkit::parse(R"JSON({
Expand Down
Loading

4 comments on commit 55481f3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (linux/llvm)

Benchmark suite Current: 55481f3 Previous: 16adce4 Ratio
JSON_Array_Of_Objects_Unique 443.41870124154434 ns/iter 448.4770890754095 ns/iter 0.99
JSON_Parse_1 30856.39630054861 ns/iter 30090.83903109611 ns/iter 1.03
JSON_Fast_Hash_Helm_Chart_Lock 54.717853651566976 ns/iter 54.68786174052018 ns/iter 1.00
JSON_Equality_Helm_Chart_Lock 150.29080986917077 ns/iter 148.96340890249002 ns/iter 1.01
Regex_Lower_S_Or_Upper_S_Asterisk 2.1813326640329915 ns/iter 2.1981092509955573 ns/iter 0.99
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.1860155093271376 ns/iter 2.183798040079222 ns/iter 1.00
Regex_Period_Asterisk 2.181417065696179 ns/iter 2.179099111927257 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 2.182036349715757 ns/iter 2.1886055407645943 ns/iter 1.00
Regex_Period_Plus 2.4914004008456194 ns/iter 2.4881015864876015 ns/iter 1.00
Regex_Period 2.506632647577241 ns/iter 2.4873470862084837 ns/iter 1.01
Regex_Caret_Period_Plus_Dollar 2.4887776977850873 ns/iter 2.487497865191268 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 2.489922474578475 ns/iter 2.4871968080426234 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 3.4192200934329176 ns/iter 3.4189465014347107 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.418952737835449 ns/iter 3.4175378116971133 ns/iter 1.00
Regex_Caret_X_Hyphen 12.504706843113246 ns/iter 12.527434995876682 ns/iter 1.00
Regex_Period_Md_Dollar 74.05161340026288 ns/iter 73.57518787834836 ns/iter 1.01
Regex_Caret_Slash_Period_Asterisk 7.093413433351044 ns/iter 7.1460825934591305 ns/iter 0.99
Regex_Caret_Period_Range_Dollar 2.5058175069195956 ns/iter 3.748331126870648 ns/iter 0.67
Regex_Nested_Backtrack 506.3542772193359 ns/iter 493.74734527764986 ns/iter 1.03
Pointer_Object_Traverse 44.90762013352479 ns/iter 44.77268042194476 ns/iter 1.00
Pointer_Object_Try_Traverse 52.26983470377153 ns/iter 52.346571993886705 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 352.297219581662 ns/iter 352.87085163843483 ns/iter 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (macos/llvm)

Benchmark suite Current: 55481f3 Previous: 16adce4 Ratio
JSON_Array_Of_Objects_Unique 407.459216519292 ns/iter 330.43087146073617 ns/iter 1.23
JSON_Parse_1 25862.212085917818 ns/iter 21221.843152698468 ns/iter 1.22
JSON_Fast_Hash_Helm_Chart_Lock 57.95479504845729 ns/iter 47.69326086406976 ns/iter 1.22
JSON_Equality_Helm_Chart_Lock 154.35157276779012 ns/iter 133.06913206316509 ns/iter 1.16
Regex_Lower_S_Or_Upper_S_Asterisk 1.7515113674257687 ns/iter 1.5689222735977724 ns/iter 1.12
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.7316679848811976 ns/iter 1.5720424518240115 ns/iter 1.10
Regex_Period_Asterisk 1.8475199273979472 ns/iter 1.5849100255488364 ns/iter 1.17
Regex_Group_Period_Asterisk_Group 1.6977302224322826 ns/iter 1.619187085412587 ns/iter 1.05
Regex_Period_Plus 2.4910686245373266 ns/iter 1.8939170674439665 ns/iter 1.32
Regex_Period 2.165795449841771 ns/iter 2.091953773469908 ns/iter 1.04
Regex_Caret_Period_Plus_Dollar 2.0989762475510423 ns/iter 1.976951513751499 ns/iter 1.06
Regex_Caret_Group_Period_Plus_Group_Dollar 2.071488316107489 ns/iter 2.015001725966835 ns/iter 1.03
Regex_Caret_Period_Asterisk_Dollar 1.7085505559815002 ns/iter 1.6003665135146479 ns/iter 1.07
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.6682543585173972 ns/iter 1.5698904069141555 ns/iter 1.06
Regex_Caret_X_Hyphen 6.564934534701128 ns/iter 6.306310681506139 ns/iter 1.04
Regex_Period_Md_Dollar 71.20947022637732 ns/iter 67.78072380757295 ns/iter 1.05
Regex_Caret_Slash_Period_Asterisk 7.5654015303254845 ns/iter 6.3807192263469545 ns/iter 1.19
Regex_Caret_Period_Range_Dollar 2.142386520023517 ns/iter 2.046429970595506 ns/iter 1.05
Regex_Nested_Backtrack 773.3462000510282 ns/iter 726.0965320237835 ns/iter 1.07
Pointer_Object_Traverse 15.725582600629465 ns/iter 14.844123704205458 ns/iter 1.06
Pointer_Object_Try_Traverse 35.45585758590162 ns/iter 31.284784202430174 ns/iter 1.13
Pointer_Push_Back_Pointer_To_Weak_Pointer 181.87580669859832 ns/iter 172.65156969807174 ns/iter 1.05

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (windows/msvc)

Benchmark suite Current: 55481f3 Previous: 16adce4 Ratio
JSON_Array_Of_Objects_Unique 419.10147843102794 ns/iter 416.14630386214554 ns/iter 1.01
JSON_Parse_1 81309.16294643495 ns/iter 79599.30360252195 ns/iter 1.02
JSON_Fast_Hash_Helm_Chart_Lock 56.79349107143342 ns/iter 54.34384999999793 ns/iter 1.05
JSON_Equality_Helm_Chart_Lock 214.83100000001087 ns/iter 219.54805269875777 ns/iter 0.98
Regex_Lower_S_Or_Upper_S_Asterisk 8.09690219599542 ns/iter 8.154109785026717 ns/iter 0.99
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 7.924672732480097 ns/iter 8.172507812501198 ns/iter 0.97
Regex_Period_Asterisk 7.952081473214482 ns/iter 7.840069196428497 ns/iter 1.01
Regex_Group_Period_Asterisk_Group 7.992249999999907 ns/iter 7.934264696722221 ns/iter 1.01
Regex_Period_Plus 7.929559786028484 ns/iter 7.777581661707126 ns/iter 1.02
Regex_Period 8.11947433035698 ns/iter 7.850442822096568 ns/iter 1.03
Regex_Caret_Period_Plus_Dollar 8.000271205356972 ns/iter 7.767732142857246 ns/iter 1.03
Regex_Caret_Group_Period_Plus_Group_Dollar 8.38834549826642 ns/iter 8.743973214285614 ns/iter 0.96
Regex_Caret_Period_Asterisk_Dollar 8.303265625000073 ns/iter 7.933832107439376 ns/iter 1.05
Regex_Caret_Group_Period_Asterisk_Group_Dollar 8.224844159711257 ns/iter 8.064123178284392 ns/iter 1.02
Regex_Caret_X_Hyphen 11.618403571428562 ns/iter 11.977482142857607 ns/iter 0.97
Regex_Period_Md_Dollar 145.94708723451558 ns/iter 143.47674805907258 ns/iter 1.02
Regex_Caret_Slash_Period_Asterisk 11.775487499999063 ns/iter 11.82410178571404 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 9.086469602291999 ns/iter 9.251618262268787 ns/iter 0.98
Regex_Nested_Backtrack 588.6363392856911 ns/iter 592.2207142856248 ns/iter 0.99
Pointer_Object_Traverse 56.69698214285899 ns/iter 55.9038800000053 ns/iter 1.01
Pointer_Object_Try_Traverse 76.37816964285449 ns/iter 75.9869531250068 ns/iter 1.01
Pointer_Push_Back_Pointer_To_Weak_Pointer 175.17648494484808 ns/iter 191.80450819683765 ns/iter 0.91

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (linux/gcc)

Benchmark suite Current: 55481f3 Previous: 16adce4 Ratio
Pointer_Object_Traverse 44.323071200537065 ns/iter 44.315735461146176 ns/iter 1.00
Pointer_Object_Try_Traverse 22.409523536155056 ns/iter 22.4184684058889 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 213.00843352003835 ns/iter 216.25236959070153 ns/iter 0.98
Regex_Lower_S_Or_Upper_S_Asterisk 3.1354589423323262 ns/iter 2.4868763559190525 ns/iter 1.26
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 3.1236844399220987 ns/iter 2.4883152921491214 ns/iter 1.26
Regex_Period_Asterisk 3.1244189730837797 ns/iter 2.4896222895821816 ns/iter 1.25
Regex_Group_Period_Asterisk_Group 3.124149829439447 ns/iter 2.495235746444008 ns/iter 1.25
Regex_Period_Plus 3.1251358316953213 ns/iter 2.797069635064368 ns/iter 1.12
Regex_Period 3.1283836481291374 ns/iter 2.798695325674326 ns/iter 1.12
Regex_Caret_Period_Plus_Dollar 3.1256782396702962 ns/iter 2.796517724700727 ns/iter 1.12
Regex_Caret_Group_Period_Plus_Group_Dollar 3.1257985513587023 ns/iter 2.8251081758681287 ns/iter 1.11
Regex_Caret_Period_Asterisk_Dollar 3.126567055852649 ns/iter 2.488767658546089 ns/iter 1.26
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.1302327364697122 ns/iter 2.493301441550906 ns/iter 1.26
Regex_Caret_X_Hyphen 12.43179876404824 ns/iter 13.05201626475827 ns/iter 0.95
Regex_Period_Md_Dollar 89.63427958149308 ns/iter 93.39210618283377 ns/iter 0.96
Regex_Caret_Slash_Period_Asterisk 7.1531579424733405 ns/iter 6.216727963282871 ns/iter 1.15
Regex_Caret_Period_Range_Dollar 3.185703537765074 ns/iter 4.043306672425007 ns/iter 0.79
Regex_Nested_Backtrack 813.1069888583747 ns/iter 819.5413688749217 ns/iter 0.99
JSON_Array_Of_Objects_Unique 377.73481002123015 ns/iter 401.9023872448747 ns/iter 0.94
JSON_Parse_1 32810.163484040466 ns/iter 32681.681430524735 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 63.95427803930726 ns/iter 58.04574385832107 ns/iter 1.10
JSON_Equality_Helm_Chart_Lock 142.6291877626806 ns/iter 143.1157399725114 ns/iter 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.