Skip to content

Implement a collection of JSON-RPC 2.0 utilities#2389

Merged
jviotti merged 4 commits into
mainfrom
extract-jsonrpc-module
May 20, 2026
Merged

Implement a collection of JSON-RPC 2.0 utilities#2389
jviotti merged 4 commits into
mainfrom
extract-jsonrpc-module

Conversation

@jviotti
Copy link
Copy Markdown
Member

@jviotti jviotti commented May 19, 2026

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented May 19, 2026

🤖 Augment PR Summary

Summary: This PR introduces a new sourcemeta::core::jsonrpc component providing JSON-RPC 2.0 helper utilities.

Changes:

  • Adds a new CMake option (SOURCEMETA_CORE_JSONRPC) and wires the component into the main build, install config, and website workflows.
  • Introduces a header-only JSON-RPC utility API (jsonrpc.h) with standard error code constants.
  • Provides helpers to detect requests vs notifications and to extract id, method, and params fields.
  • Adds helpers to construct JSON-RPC success envelopes and error envelopes (including common predefined errors).
  • Adds a dedicated unit test suite for the new utilities and extends the find_package packaging test to link/include the new component.

Technical Notes: The JSON-RPC component is implemented as an INTERFACE library that depends on sourcemeta::core::json and is intended to be consumed via #include <sourcemeta/core/jsonrpc.h>.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

}
const auto *identifier{request.try_at("id", JSONRPC_HASH_ID)};
if (identifier == nullptr ||
(!identifier->is_string() && !identifier->is_integer())) {
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 19, 2026

Choose a reason for hiding this comment

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

src/core/jsonrpc/include/sourcemeta/core/jsonrpc.h:63 — JSON-RPC 2.0 allows request id to be a String, Number, or Null; jsonrpc_request_id() currently rejects null and any non-integer numeric ids, which can cause valid requests to be treated as invalid. This also impacts jsonrpc_is_request() since it depends on jsonrpc_request_id().

Severity: medium

Other Locations
  • test/jsonrpc/jsonrpc_test.cc:78
  • test/jsonrpc/jsonrpc_test.cc:84
  • test/jsonrpc/jsonrpc_test.cc:118

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

envelope.assign_assume_new(std::string{"jsonrpc"},
sourcemeta::core::JSON{"2.0"},
JSONRPC_HASH_JSONRPC);
if (id != nullptr) {
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 19, 2026

Choose a reason for hiding this comment

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

src/core/jsonrpc/include/sourcemeta/core/jsonrpc.h:150 — When id is unknown (e.g., Parse error / Invalid Request), the JSON-RPC 2.0 spec requires the error Response object to include an id member with value null; omitting the id field entirely may break spec-compliant clients. This affects jsonrpc_make_error_parse() and jsonrpc_make_error_invalid_request() when called with nullptr.

Severity: medium

Other Locations
  • test/jsonrpc/jsonrpc_test.cc:362
  • test/jsonrpc/jsonrpc_test.cc:391

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 10 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/core/jsonrpc/include/sourcemeta/core/jsonrpc.h">

<violation number="1" location="src/core/jsonrpc/include/sourcemeta/core/jsonrpc.h:63">
P2: `jsonrpc_request_id` rejects valid JSON-RPC 2.0 IDs (`null` and non-integer numbers), causing compliant requests to be treated as invalid.</violation>

<violation number="2" location="src/core/jsonrpc/include/sourcemeta/core/jsonrpc.h:150">
P1: Error responses omit `id` when request ID is unknown, but JSON-RPC 2.0 requires `id: null` in that case.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment on lines +150 to +153
if (id != nullptr) {
envelope.assign_assume_new(std::string{"id"}, sourcemeta::core::JSON{*id},
JSONRPC_HASH_ID);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1: Error responses omit id when request ID is unknown, but JSON-RPC 2.0 requires id: null in that case.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/core/jsonrpc/include/sourcemeta/core/jsonrpc.h, line 150:

<comment>Error responses omit `id` when request ID is unknown, but JSON-RPC 2.0 requires `id: null` in that case.</comment>

<file context>
@@ -0,0 +1,205 @@
+  envelope.assign_assume_new(std::string{"jsonrpc"},
+                             sourcemeta::core::JSON{"2.0"},
+                             JSONRPC_HASH_JSONRPC);
+  if (id != nullptr) {
+    envelope.assign_assume_new(std::string{"id"}, sourcemeta::core::JSON{*id},
+                               JSONRPC_HASH_ID);
</file context>
Suggested change
if (id != nullptr) {
envelope.assign_assume_new(std::string{"id"}, sourcemeta::core::JSON{*id},
JSONRPC_HASH_ID);
}
envelope.assign_assume_new(
std::string{"id"},
id != nullptr ? sourcemeta::core::JSON{*id}
: sourcemeta::core::JSON{nullptr},
JSONRPC_HASH_ID);

}
const auto *identifier{request.try_at("id", JSONRPC_HASH_ID)};
if (identifier == nullptr ||
(!identifier->is_string() && !identifier->is_integer())) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: jsonrpc_request_id rejects valid JSON-RPC 2.0 IDs (null and non-integer numbers), causing compliant requests to be treated as invalid.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/core/jsonrpc/include/sourcemeta/core/jsonrpc.h, line 63:

<comment>`jsonrpc_request_id` rejects valid JSON-RPC 2.0 IDs (`null` and non-integer numbers), causing compliant requests to be treated as invalid.</comment>

<file context>
@@ -0,0 +1,205 @@
+  }
+  const auto *identifier{request.try_at("id", JSONRPC_HASH_ID)};
+  if (identifier == nullptr ||
+      (!identifier->is_string() && !identifier->is_integer())) {
+    return nullptr;
+  }
</file context>

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Benchmark (macos/llvm)

Details
Benchmark suite Current: 0e74d8f Previous: 0f99990 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.7598047752044332 ns/iter 2.164824223512949 ns/iter 0.81
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.7810896976923594 ns/iter 2.154725315058643 ns/iter 0.83
Regex_Period_Asterisk 1.7265820716760016 ns/iter 2.097632475105026 ns/iter 0.82
Regex_Group_Period_Asterisk_Group 1.7182590436352616 ns/iter 2.391929127143718 ns/iter 0.72
Regex_Period_Plus 2.2030969189426206 ns/iter 2.585540187150559 ns/iter 0.85
Regex_Period 2.086892169934568 ns/iter 2.7488470131744167 ns/iter 0.76
Regex_Caret_Period_Plus_Dollar 2.3595611073422513 ns/iter 2.8673242749705024 ns/iter 0.82
Regex_Caret_Group_Period_Plus_Group_Dollar 2.076117612059434 ns/iter 2.47436120959155 ns/iter 0.84
Regex_Caret_Period_Asterisk_Dollar 1.862898962929003 ns/iter 1.9026327301047679 ns/iter 0.98
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.716755434724378 ns/iter 2.2345862279337165 ns/iter 0.77
Regex_Caret_X_Hyphen 6.179070749356727 ns/iter 7.400191012384467 ns/iter 0.83
Regex_Period_Md_Dollar 17.81741717315917 ns/iter 20.46974109444825 ns/iter 0.87
Regex_Caret_Slash_Period_Asterisk 8.956857343596798 ns/iter 9.445398243713052 ns/iter 0.95
Regex_Caret_Period_Range_Dollar 1.7373330397557694 ns/iter 1.8294891354697975 ns/iter 0.95
Regex_Nested_Backtrack 30.564734282715158 ns/iter 26.000402824925214 ns/iter 1.18
JSON_Array_Of_Objects_Unique 370.9323038128433 ns/iter 381.8906294746827 ns/iter 0.97
JSON_Parse_1 4277.676071817274 ns/iter 4620.975946706663 ns/iter 0.93
JSON_Parse_Real 6711.591538694184 ns/iter 7757.773380515209 ns/iter 0.87
JSON_Parse_Decimal 8625.627529403077 ns/iter 9239.53857813832 ns/iter 0.93
JSON_Parse_Schema_ISO_Language 3404577.513513252 ns/iter 3749036.6794253006 ns/iter 0.91
JSON_Fast_Hash_Helm_Chart_Lock 64.80006046585115 ns/iter 77.70004396235835 ns/iter 0.83
JSON_Equality_Helm_Chart_Lock 138.49426402204662 ns/iter 192.32217145410942 ns/iter 0.72
JSON_Divisible_By_Decimal 177.7703432104929 ns/iter 243.5498163683403 ns/iter 0.73
JSON_String_Equal/10 7.011897621267145 ns/iter 9.561976723269412 ns/iter 0.73
JSON_String_Equal/100 7.44177490624023 ns/iter 8.880368564816585 ns/iter 0.84
JSON_String_Equal_Small_By_Perfect_Hash/10 0.8272514660935189 ns/iter 1.1094408229518518 ns/iter 0.75
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.500470710480311 ns/iter 4.708479052352588 ns/iter 0.74
JSON_String_Fast_Hash/10 2.4223193291302274 ns/iter 3.1124667742734125 ns/iter 0.78
JSON_String_Fast_Hash/100 2.2055543033689307 ns/iter 2.740414399713207 ns/iter 0.80
JSON_String_Key_Hash/10 1.4987051613572848 ns/iter 1.9226208697304676 ns/iter 0.78
JSON_String_Key_Hash/100 2.234389668701043 ns/iter 3.086009945251617 ns/iter 0.72
JSON_Object_Defines_Miss_Same_Length 2.4960091298610747 ns/iter 3.636633581065919 ns/iter 0.69
JSON_Object_Defines_Miss_Too_Small 2.6969728725654383 ns/iter 3.287511985858025 ns/iter 0.82
JSON_Object_Defines_Miss_Too_Large 2.7876443601657726 ns/iter 3.3217053195286996 ns/iter 0.84
Pointer_Object_Traverse 14.028830955109493 ns/iter 21.367287513185143 ns/iter 0.66
Pointer_Object_Try_Traverse 22.02497507746342 ns/iter 28.992122826781454 ns/iter 0.76
Pointer_Push_Back_Pointer_To_Weak_Pointer 154.48386574251577 ns/iter 231.36561176312725 ns/iter 0.67
Pointer_Walker_Schema_ISO_Language 4488193.69090884 ns/iter 6663705.808080641 ns/iter 0.67
Pointer_Maybe_Tracked_Deeply_Nested/0 1068565.1584852608 ns/iter 1565104.2274053514 ns/iter 0.68
Pointer_Maybe_Tracked_Deeply_Nested/1 1429239.478957908 ns/iter 2249994.5254691346 ns/iter 0.64
Pointer_Position_Tracker_Get_Deeply_Nested 376.85090059010196 ns/iter 581.2908329999118 ns/iter 0.65
Schema_Frame_WoT_References 4803357.611510476 ns/iter 7591004.573172784 ns/iter 0.63
Schema_Frame_OMC_References 23360550.00000291 ns/iter 50970774.99999614 ns/iter 0.46
Schema_Frame_OMC_Locations 23086483.333334703 ns/iter 38289636.61111275 ns/iter 0.60
Schema_Frame_ISO_Language_Locations 71715820.80000007 ns/iter 113965108.20000002 ns/iter 0.63
Schema_Frame_KrakenD_References 42318546.58823576 ns/iter 73390560.636364 ns/iter 0.58
Schema_Frame_KrakenD_Reachable 395323916.49999 ns/iter 693870167.0001137 ns/iter 0.57
Schema_Iterator_ISO_Language 2382912.9692832837 ns/iter 3644410.9365080805 ns/iter 0.65
Schema_Frame_ISO_Language_Locations_To_JSON 72323611.11111157 ns/iter 138545658.39997122 ns/iter 0.52
Schema_Tracker_ISO_Language 5433253.425373258 ns/iter 9052068.482759196 ns/iter 0.60
Schema_Tracker_ISO_Language_To_JSON 14199666.679999154 ns/iter 21016121.71052717 ns/iter 0.68
Schema_Format_ISO_Language_To_JSON 77357462.99998583 ns/iter 130659875.00003 ns/iter 0.59
Schema_Bundle_Meta_2020_12 1333395.3240539208 ns/iter 2003250.3157928206 ns/iter 0.67
Schema_Frame_Many_Resources_References 293600374.9999827 ns/iter 527403583.000023 ns/iter 0.56
EditorSchema_ForEditor_EmbeddedResources 12272282.982758826 ns/iter 17978715.70588139 ns/iter 0.68
URITemplateRouter_Create 23018.975481146965 ns/iter 37347.99902829181 ns/iter 0.62
URITemplateRouter_Match 164.37732573428687 ns/iter 209.9142220975487 ns/iter 0.78
URITemplateRouter_Match_BasePath 194.0041815822899 ns/iter 284.29283732111764 ns/iter 0.68
URITemplateRouterView_Restore 9829.961840217726 ns/iter 17477.582791503188 ns/iter 0.56
URITemplateRouterView_Match 130.82114344490833 ns/iter 159.81214440555 ns/iter 0.82
URITemplateRouterView_Match_BasePath 148.94612430606318 ns/iter 176.0342225270448 ns/iter 0.85
URITemplateRouterView_Arguments 425.2968579336711 ns/iter 523.9539632092753 ns/iter 0.81
JSONL_Parse_Large 12535379.46428399 ns/iter 16646365.071426857 ns/iter 0.75
JSONL_Parse_Large_GZIP 13657181.09615535 ns/iter 15669705.477271443 ns/iter 0.87
HTML_Build_Table_100000 68567432.25000627 ns/iter 92802157.44444023 ns/iter 0.74
HTML_Render_Table_100000 4733269.643311852 ns/iter 6607362.919999105 ns/iter 0.72
GZIP_Compress_ISO_Language_Set_3_Locations 31931854.166667033 ns/iter 36756895.86363908 ns/iter 0.87
GZIP_Decompress_ISO_Language_Set_3_Locations 5573581.362205363 ns/iter 7223720.518868076 ns/iter 0.77
GZIP_Compress_ISO_Language_Set_3_Schema 1524516.0177778415 ns/iter 2060029.051987954 ns/iter 0.74
GZIP_Decompress_ISO_Language_Set_3_Schema 283364.51680002024 ns/iter 329729.8322981298 ns/iter 0.86

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

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Benchmark (linux/llvm)

Details
Benchmark suite Current: 0e74d8f Previous: 0f99990 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.2400507977569366 ns/iter 2.196238724626547 ns/iter 1.02
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.178774862476148 ns/iter 2.19677043568403 ns/iter 0.99
Regex_Period_Asterisk 2.1927666093351013 ns/iter 2.1898423926098194 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 2.182457736854266 ns/iter 2.179285735703328 ns/iter 1.00
Regex_Period_Plus 2.8021545933819443 ns/iter 2.838283203388213 ns/iter 0.99
Regex_Period 2.490241087815826 ns/iter 2.4991075765341026 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 2.8023113479408104 ns/iter 2.803713238773092 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 2.4903020212279454 ns/iter 2.49046560647752 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 3.4243862836798167 ns/iter 3.4231478219392013 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.185276578901755 ns/iter 3.1145690381598956 ns/iter 0.70
Regex_Caret_X_Hyphen 5.945218238322212 ns/iter 5.6143523161176665 ns/iter 1.06
Regex_Period_Md_Dollar 27.35282332122705 ns/iter 27.3304196461679 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 6.221541484437031 ns/iter 5.915350860522869 ns/iter 1.05
Regex_Caret_Period_Range_Dollar 3.7341160874647343 ns/iter 2.803873115021437 ns/iter 1.33
Regex_Nested_Backtrack 37.43388898798472 ns/iter 37.19355578646237 ns/iter 1.01
JSON_Array_Of_Objects_Unique 383.96268788594847 ns/iter 394.82615250186046 ns/iter 0.97
JSON_Parse_1 5748.643876814204 ns/iter 5806.186614917438 ns/iter 0.99
JSON_Parse_Real 11062.444314464356 ns/iter 10965.42265726709 ns/iter 1.01
JSON_Parse_Decimal 11023.844110526534 ns/iter 10950.71720340792 ns/iter 1.01
JSON_Parse_Schema_ISO_Language 3577647.1116752117 ns/iter 3545393.873096353 ns/iter 1.01
JSON_Fast_Hash_Helm_Chart_Lock 53.884273490994225 ns/iter 54.05254651275286 ns/iter 1.00
JSON_Equality_Helm_Chart_Lock 159.79322245128924 ns/iter 166.43079049256457 ns/iter 0.96
JSON_Divisible_By_Decimal 245.02382397022993 ns/iter 249.66490162611336 ns/iter 0.98
JSON_String_Equal/10 6.229922417534045 ns/iter 6.233628586561793 ns/iter 1.00
JSON_String_Equal/100 6.856839104316662 ns/iter 6.854638010100771 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9356705727465714 ns/iter 0.9362945647570464 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 10.26923965130722 ns/iter 10.281225453715587 ns/iter 1.00
JSON_String_Fast_Hash/10 2.1788578784351698 ns/iter 2.1834123160391536 ns/iter 1.00
JSON_String_Fast_Hash/100 2.232213533424519 ns/iter 2.1797080600635734 ns/iter 1.02
JSON_String_Key_Hash/10 2.1813578506641123 ns/iter 2.1809378277424964 ns/iter 1.00
JSON_String_Key_Hash/100 6.535017953787097 ns/iter 6.537661650063403 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 3.742205902638436 ns/iter 3.738812712208054 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 3.7664243223561265 ns/iter 3.739433737253068 ns/iter 1.01
JSON_Object_Defines_Miss_Too_Large 3.7384052276400563 ns/iter 3.739394985190339 ns/iter 1.00
Pointer_Object_Traverse 24.364120076176764 ns/iter 24.298178573304565 ns/iter 1.00
Pointer_Object_Try_Traverse 26.061651866042528 ns/iter 26.046158828916205 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 162.0371979674001 ns/iter 168.262958641335 ns/iter 0.96
Pointer_Walker_Schema_ISO_Language 3063530.082969351 ns/iter 3069144.2675436465 ns/iter 1.00
Pointer_Maybe_Tracked_Deeply_Nested/0 1444324.570841904 ns/iter 1450394.0020619768 ns/iter 1.00
Pointer_Maybe_Tracked_Deeply_Nested/1 1828062.7526040168 ns/iter 1736819.2406949166 ns/iter 1.05
Pointer_Position_Tracker_Get_Deeply_Nested 655.3547832048594 ns/iter 638.6140904139223 ns/iter 1.03
Schema_Frame_WoT_References 5219224.694029103 ns/iter 5248336.291044576 ns/iter 0.99
Schema_Frame_OMC_References 21626036.090910103 ns/iter 21687108.750001017 ns/iter 1.00
Schema_Frame_OMC_Locations 19773873.558823895 ns/iter 19986427.794118058 ns/iter 0.99
Schema_Frame_ISO_Language_Locations 101965506.83334257 ns/iter 102045814.83333187 ns/iter 1.00
Schema_Frame_KrakenD_References 41214674.235294186 ns/iter 40169082.76470504 ns/iter 1.03
Schema_Frame_KrakenD_Reachable 606737843.9998947 ns/iter 593977528.9999716 ns/iter 1.02
Schema_Iterator_ISO_Language 2970344.246808325 ns/iter 2946992.4110170053 ns/iter 1.01
Schema_Frame_ISO_Language_Locations_To_JSON 111110616.59998997 ns/iter 108183806.2000088 ns/iter 1.03
Schema_Tracker_ISO_Language 4630826.486666137 ns/iter 4525815.4610386165 ns/iter 1.02
Schema_Tracker_ISO_Language_To_JSON 19214310.472225152 ns/iter 19310878.888890985 ns/iter 0.99
Schema_Format_ISO_Language_To_JSON 108909963.83331716 ns/iter 108808629.50000392 ns/iter 1.00
Schema_Bundle_Meta_2020_12 1696422.2475754132 ns/iter 1704426.1320298377 ns/iter 1.00
Schema_Frame_Many_Resources_References 374870991.5000177 ns/iter 380204093.50002635 ns/iter 0.99
EditorSchema_ForEditor_EmbeddedResources 13840133.333333677 ns/iter 14030158.489789551 ns/iter 0.99
URITemplateRouter_Create 32127.966153701473 ns/iter 32226.11743821536 ns/iter 1.00
URITemplateRouter_Match 176.45376403529275 ns/iter 175.57599608849873 ns/iter 1.00
URITemplateRouter_Match_BasePath 203.45425519305317 ns/iter 203.57366633917604 ns/iter 1.00
URITemplateRouterView_Restore 7696.436440632491 ns/iter 8059.902168669955 ns/iter 0.95
URITemplateRouterView_Match 144.13643808549224 ns/iter 144.35875957256508 ns/iter 1.00
URITemplateRouterView_Match_BasePath 163.27507695475703 ns/iter 164.04919984809007 ns/iter 1.00
URITemplateRouterView_Arguments 437.37525542662974 ns/iter 432.3201461043553 ns/iter 1.01
JSONL_Parse_Large 10675900.415384814 ns/iter 10881832.553844525 ns/iter 0.98
JSONL_Parse_Large_GZIP 11900947.10169641 ns/iter 11921494.220338624 ns/iter 1.00
HTML_Build_Table_100000 63137268.36363416 ns/iter 64227226.818182066 ns/iter 0.98
HTML_Render_Table_100000 5377078.806201668 ns/iter 5490412.911999555 ns/iter 0.98
GZIP_Compress_ISO_Language_Set_3_Locations 34732084.400002345 ns/iter 34797530.449998245 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Locations 4883964.852941644 ns/iter 4814384.386206476 ns/iter 1.01
GZIP_Compress_ISO_Language_Set_3_Schema 1907319.7759564477 ns/iter 1910306.623978194 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Schema 379082.68484189245 ns/iter 378731.43604965037 ns/iter 1.00

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

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Benchmark (windows/msvc)

Details
Benchmark suite Current: 0e74d8f Previous: 0f99990 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 7.328263392858097 ns/iter 6.835220535713964 ns/iter 1.07
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 7.276833035713739 ns/iter 6.836834821429858 ns/iter 1.06
Regex_Period_Asterisk 7.286366071428724 ns/iter 6.871532142856803 ns/iter 1.06
Regex_Group_Period_Asterisk_Group 7.2780946428565585 ns/iter 6.946556249999958 ns/iter 1.05
Regex_Period_Plus 8.415369605289833 ns/iter 8.745559151786304 ns/iter 0.96
Regex_Period 8.428802640945255 ns/iter 8.744487014533258 ns/iter 0.96
Regex_Caret_Period_Plus_Dollar 8.42335000000105 ns/iter 8.743770496677316 ns/iter 0.96
Regex_Caret_Group_Period_Plus_Group_Dollar 8.42378969453634 ns/iter 8.742415139543322 ns/iter 0.96
Regex_Caret_Period_Asterisk_Dollar 7.279946428572057 ns/iter 6.83380691964481 ns/iter 1.07
Regex_Caret_Group_Period_Asterisk_Group_Dollar 7.285022321428565 ns/iter 6.8706071428563975 ns/iter 1.06
Regex_Caret_X_Hyphen 10.05811736581252 ns/iter 10.661051562500745 ns/iter 0.94
Regex_Period_Md_Dollar 34.288003660745524 ns/iter 31.253562499996082 ns/iter 1.10
Regex_Caret_Slash_Period_Asterisk 9.627551742734173 ns/iter 10.113404687498218 ns/iter 0.95
Regex_Caret_Period_Range_Dollar 8.005035714285315 ns/iter 8.74789843750128 ns/iter 0.92
Regex_Nested_Backtrack 41.919566158233366 ns/iter 38.65751674107441 ns/iter 1.08
JSON_Array_Of_Objects_Unique 389.3010602678311 ns/iter 383.9915207159067 ns/iter 1.01
JSON_Parse_1 7595.5937500005175 ns/iter 5940.961607143841 ns/iter 1.28
JSON_Parse_Real 14834.732211016348 ns/iter 10795.140625003087 ns/iter 1.37
JSON_Parse_Decimal 15060.793925027456 ns/iter 11140.618749998055 ns/iter 1.35
JSON_Parse_Schema_ISO_Language 7188460.000000102 ns/iter 5259386.999998696 ns/iter 1.37
JSON_Fast_Hash_Helm_Chart_Lock 49.24244999999701 ns/iter 44.97961037900525 ns/iter 1.09
JSON_Equality_Helm_Chart_Lock 236.6318374294903 ns/iter 220.0027499999635 ns/iter 1.08
JSON_Divisible_By_Decimal 270.0100254468921 ns/iter 201.679839435662 ns/iter 1.34
JSON_String_Equal/10 10.288317187502116 ns/iter 9.195228976807313 ns/iter 1.12
JSON_String_Equal/100 12.28909285714508 ns/iter 10.20756250000332 ns/iter 1.20
JSON_String_Equal_Small_By_Perfect_Hash/10 1.4903708698705924 ns/iter 1.6410142857142977 ns/iter 0.91
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 9.901825000000033 ns/iter 8.752094157355506 ns/iter 1.13
JSON_String_Fast_Hash/10 2.057032653954462 ns/iter 2.8174993935476595 ns/iter 0.73
JSON_String_Fast_Hash/100 2.075425332504715 ns/iter 2.9578822505027436 ns/iter 0.70
JSON_String_Key_Hash/10 3.2213379464280933 ns/iter 3.8089060646274437 ns/iter 0.85
JSON_String_Key_Hash/100 13.812820250833141 ns/iter 13.256969806889407 ns/iter 1.04
JSON_Object_Defines_Miss_Same_Length 4.292496158798989 ns/iter 3.0761973214288627 ns/iter 1.40
JSON_Object_Defines_Miss_Too_Small 4.806212287514326 ns/iter 4.27732532203458 ns/iter 1.12
JSON_Object_Defines_Miss_Too_Large 3.635123297890982 ns/iter 3.1570664111825137 ns/iter 1.15
Pointer_Object_Traverse 36.377243993270426 ns/iter 32.984679160447136 ns/iter 1.10
Pointer_Object_Try_Traverse 49.22894766141559 ns/iter 45.28616473626952 ns/iter 1.09
Pointer_Push_Back_Pointer_To_Weak_Pointer 175.67978408566827 ns/iter 126.6791964285728 ns/iter 1.39
Pointer_Walker_Schema_ISO_Language 13067973.214284781 ns/iter 10214146.875000551 ns/iter 1.28
Pointer_Maybe_Tracked_Deeply_Nested/0 2155796.0714289946 ns/iter 1679547.2463762553 ns/iter 1.28
Pointer_Maybe_Tracked_Deeply_Nested/1 3914800.581395507 ns/iter 2441202.006688868 ns/iter 1.60
Pointer_Position_Tracker_Get_Deeply_Nested 543.3887702578871 ns/iter 468.76553571430736 ns/iter 1.16
Schema_Frame_WoT_References 9835159.375001013 ns/iter 8002545.555554105 ns/iter 1.23
Schema_Frame_OMC_References 43485886.66666729 ns/iter 34481331.578945175 ns/iter 1.26
Schema_Frame_OMC_Locations 40948847.058831125 ns/iter 31992166.66666871 ns/iter 1.28
Schema_Frame_ISO_Language_Locations 190322166.66672263 ns/iter 159323325.00000256 ns/iter 1.19
Schema_Frame_KrakenD_References 89151642.85713218 ns/iter 72204377.77777988 ns/iter 1.23
Schema_Frame_KrakenD_Reachable 615025700.0001602 ns/iter 411649749.9999241 ns/iter 1.49
Schema_Iterator_ISO_Language 7081411.111110154 ns/iter 5213077.678571868 ns/iter 1.36
Schema_Frame_ISO_Language_Locations_To_JSON 296204299.9999994 ns/iter 254558999.999972 ns/iter 1.16
Schema_Tracker_ISO_Language 11394142.857142242 ns/iter 7928446.666664967 ns/iter 1.44
Schema_Tracker_ISO_Language_To_JSON 51479081.81817746 ns/iter 41149700.000005394 ns/iter 1.25
Schema_Format_ISO_Language_To_JSON 195725733.33334732 ns/iter 160982250.00001776 ns/iter 1.22
Schema_Bundle_Meta_2020_12 2745473.106053644 ns/iter 2219402.1874987865 ns/iter 1.24
Schema_Frame_Many_Resources_References 1393620699.9999285 ns/iter 1153404899.9999413 ns/iter 1.21
EditorSchema_ForEditor_EmbeddedResources 27242003.846175488 ns/iter 23619621.428565554 ns/iter 1.15
URITemplateRouter_Create 38306.3918266716 ns/iter 28526.489613881145 ns/iter 1.34
URITemplateRouter_Match 212.0249062500079 ns/iter 168.56580369863664 ns/iter 1.26
URITemplateRouter_Match_BasePath 253.68244936575144 ns/iter 196.08949571025875 ns/iter 1.29
URITemplateRouterView_Restore 25792.903571430415 ns/iter 17828.170787240753 ns/iter 1.45
URITemplateRouterView_Match 149.00212504452142 ns/iter 119.53478125001027 ns/iter 1.25
URITemplateRouterView_Match_BasePath 171.05828124996947 ns/iter 138.4326964285622 ns/iter 1.24
URITemplateRouterView_Arguments 426.43095502271586 ns/iter 341.5753189961684 ns/iter 1.25
JSONL_Parse_Large 26831469.23077227 ns/iter 21206982.35293784 ns/iter 1.27
JSONL_Parse_Large_GZIP 26612684.615385592 ns/iter 21283552.941179764 ns/iter 1.25
HTML_Build_Table_100000 94459571.42858268 ns/iter 73268055.5555463 ns/iter 1.29
HTML_Render_Table_100000 12081798.214288548 ns/iter 6854334.821428307 ns/iter 1.76
GZIP_Compress_ISO_Language_Set_3_Locations 40982805.88234903 ns/iter 35092776.190475926 ns/iter 1.17
GZIP_Decompress_ISO_Language_Set_3_Locations 13871770.00000065 ns/iter 8188218.888888817 ns/iter 1.69
GZIP_Compress_ISO_Language_Set_3_Schema 2348928.7625412596 ns/iter 1889065.2173916125 ns/iter 1.24
GZIP_Decompress_ISO_Language_Set_3_Schema 760050.5580356298 ns/iter 509634.19999993674 ns/iter 1.49

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

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Benchmark (linux/gcc)

Details
Benchmark suite Current: 0e74d8f Previous: 0f99990 Ratio
GZIP_Compress_ISO_Language_Set_3_Locations 41243534.6470642 ns/iter 38414350.50000857 ns/iter 1.07
GZIP_Decompress_ISO_Language_Set_3_Locations 4451996.929936483 ns/iter 5104608.258503491 ns/iter 0.87
GZIP_Compress_ISO_Language_Set_3_Schema 2340917.7190638655 ns/iter 2071539.3690476872 ns/iter 1.13
GZIP_Decompress_ISO_Language_Set_3_Schema 317079.4767008763 ns/iter 392474.4208754264 ns/iter 0.81
HTML_Build_Table_100000 65533368.36364823 ns/iter 60547053.41667462 ns/iter 1.08
HTML_Render_Table_100000 1890582.5148250011 ns/iter 1932342.675900145 ns/iter 0.98
JSONL_Parse_Large 12259593.98245897 ns/iter 13081367.79629489 ns/iter 0.94
JSONL_Parse_Large_GZIP 13397370.423075033 ns/iter 14265607.591837859 ns/iter 0.94
URITemplateRouter_Create 28966.473896574724 ns/iter 29519.293549869886 ns/iter 0.98
URITemplateRouter_Match 172.84008746329422 ns/iter 184.23172196082265 ns/iter 0.94
URITemplateRouter_Match_BasePath 203.32310366491717 ns/iter 210.58989805887438 ns/iter 0.97
URITemplateRouterView_Restore 8594.53559632586 ns/iter 7821.3073885012855 ns/iter 1.10
URITemplateRouterView_Match 132.0746574942833 ns/iter 141.41491515323122 ns/iter 0.93
URITemplateRouterView_Match_BasePath 156.1066749429386 ns/iter 162.62906042240397 ns/iter 0.96
URITemplateRouterView_Arguments 460.7674521973823 ns/iter 474.13942245540784 ns/iter 0.97
EditorSchema_ForEditor_EmbeddedResources 14053680.90000593 ns/iter 13894200.823544594 ns/iter 1.01
Schema_Frame_WoT_References 5494091.328124284 ns/iter 5392675.307692885 ns/iter 1.02
Schema_Frame_OMC_References 23000908.73333526 ns/iter 22048629.250001285 ns/iter 1.04
Schema_Frame_OMC_Locations 21253228.303032413 ns/iter 20449686.823527 ns/iter 1.04
Schema_Frame_ISO_Language_Locations 101752469.00001054 ns/iter 102075825.8571602 ns/iter 1.00
Schema_Frame_KrakenD_References 41720432.64706564 ns/iter 39748899.49999276 ns/iter 1.05
Schema_Frame_KrakenD_Reachable 597654206.9997777 ns/iter 520983430.99987686 ns/iter 1.15
Schema_Iterator_ISO_Language 3256976.5747660305 ns/iter 3396330.2657009964 ns/iter 0.96
Schema_Frame_ISO_Language_Locations_To_JSON 228922222.333343 ns/iter 219780918.33329928 ns/iter 1.04
Schema_Tracker_ISO_Language 4421781.553459506 ns/iter 4628107.888158028 ns/iter 0.96
Schema_Tracker_ISO_Language_To_JSON 22050605.354838956 ns/iter 22261183.80644948 ns/iter 0.99
Schema_Format_ISO_Language_To_JSON 107463289.4285839 ns/iter 108794332.00007801 ns/iter 0.99
Schema_Bundle_Meta_2020_12 1767513.7853501323 ns/iter 1812461.5207281532 ns/iter 0.98
Schema_Frame_Many_Resources_References 386595228.0000329 ns/iter 373817336.0000019 ns/iter 1.03
Pointer_Object_Traverse 30.266916745865046 ns/iter 28.185930523081446 ns/iter 1.07
Pointer_Object_Try_Traverse 22.07822210314477 ns/iter 22.62770287865175 ns/iter 0.98
Pointer_Push_Back_Pointer_To_Weak_Pointer 169.39404174952872 ns/iter 172.8031553652545 ns/iter 0.98
Pointer_Walker_Schema_ISO_Language 3486029.499999678 ns/iter 3315384.8537730877 ns/iter 1.05
Pointer_Maybe_Tracked_Deeply_Nested/0 1538364.9276314199 ns/iter 1592032.6086951941 ns/iter 0.97
Pointer_Maybe_Tracked_Deeply_Nested/1 1737379.0413439705 ns/iter 1797705.9589745693 ns/iter 0.97
Pointer_Position_Tracker_Get_Deeply_Nested 538.6439081382839 ns/iter 422.41602039804286 ns/iter 1.28
JSON_Array_Of_Objects_Unique 433.3059151434814 ns/iter 414.08866799405587 ns/iter 1.05
JSON_Parse_1 7982.212368104334 ns/iter 7949.967744124676 ns/iter 1.00
JSON_Parse_Real 11780.879112392962 ns/iter 11800.026245965306 ns/iter 1.00
JSON_Parse_Decimal 16418.489011505546 ns/iter 17709.386526793773 ns/iter 0.93
JSON_Parse_Schema_ISO_Language 4569206.424835429 ns/iter 4653418.946666837 ns/iter 0.98
JSON_Fast_Hash_Helm_Chart_Lock 61.370576247605015 ns/iter 65.65382887334636 ns/iter 0.93
JSON_Equality_Helm_Chart_Lock 192.07667842826052 ns/iter 166.89863210109502 ns/iter 1.15
JSON_Divisible_By_Decimal 230.19303100506085 ns/iter 239.13130642943378 ns/iter 0.96
JSON_String_Equal/10 6.823333334339441 ns/iter 6.780123557521128 ns/iter 1.01
JSON_String_Equal/100 7.522797539343895 ns/iter 7.592864908934512 ns/iter 0.99
JSON_String_Equal_Small_By_Perfect_Hash/10 0.7083031350651117 ns/iter 0.624055668901997 ns/iter 1.13
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 21.9472752585892 ns/iter 25.19044267514054 ns/iter 0.87
JSON_String_Fast_Hash/10 1.8035071559126843 ns/iter 1.5566970026562401 ns/iter 1.16
JSON_String_Fast_Hash/100 1.7593163651497634 ns/iter 1.5627359356164416 ns/iter 1.13
JSON_String_Key_Hash/10 1.0844221311809055 ns/iter 1.2471665423827398 ns/iter 0.87
JSON_String_Key_Hash/100 15.075593930027473 ns/iter 12.444906671122887 ns/iter 1.21
JSON_Object_Defines_Miss_Same_Length 3.890197317617804 ns/iter 3.432940617644008 ns/iter 1.13
JSON_Object_Defines_Miss_Too_Small 4.223157528897877 ns/iter 3.733336912133894 ns/iter 1.13
JSON_Object_Defines_Miss_Too_Large 3.5177747774925674 ns/iter 3.111059235152727 ns/iter 1.13
Regex_Lower_S_Or_Upper_S_Asterisk 0.7038513940007121 ns/iter 0.6231000638116136 ns/iter 1.13
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 0.7034068063687585 ns/iter 0.622910307940222 ns/iter 1.13
Regex_Period_Asterisk 1.055184293167884 ns/iter 0.9343977401723562 ns/iter 1.13
Regex_Group_Period_Asterisk_Group 1.0548861120915534 ns/iter 0.9347190971009051 ns/iter 1.13
Regex_Period_Plus 0.70363879377738 ns/iter 0.6224837157356574 ns/iter 1.13
Regex_Period 0.70375398855147 ns/iter 0.6232169008766775 ns/iter 1.13
Regex_Caret_Period_Plus_Dollar 1.0555992975208317 ns/iter 0.9341110478900981 ns/iter 1.13
Regex_Caret_Group_Period_Plus_Group_Dollar 1.056384596006053 ns/iter 0.9340997568737703 ns/iter 1.13
Regex_Caret_Period_Asterisk_Dollar 0.70744661470153 ns/iter 0.6234142587888946 ns/iter 1.13
Regex_Caret_Group_Period_Asterisk_Group_Dollar 0.7039306530709062 ns/iter 0.6272639958758401 ns/iter 1.12
Regex_Caret_X_Hyphen 4.219998856030123 ns/iter 4.668295181617018 ns/iter 0.90
Regex_Period_Md_Dollar 35.05006258770366 ns/iter 28.45638559465904 ns/iter 1.23
Regex_Caret_Slash_Period_Asterisk 4.570492411254039 ns/iter 4.671087313078456 ns/iter 0.98
Regex_Caret_Period_Range_Dollar 0.838961349674217 ns/iter 0.7781897015660446 ns/iter 1.08
Regex_Nested_Backtrack 38.67201493221182 ns/iter 36.331742362748486 ns/iter 1.06

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

jviotti added 2 commits May 20, 2026 09:15
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti merged commit 4e07bd7 into main May 20, 2026
13 checks passed
@jviotti jviotti deleted the extract-jsonrpc-module branch May 20, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant