Skip to content

Implement sourcemeta::core::atomic_directory_replace#2277

Merged
jviotti merged 2 commits intomainfrom
atomic-directory-replace
Feb 26, 2026
Merged

Implement sourcemeta::core::atomic_directory_replace#2277
jviotti merged 2 commits intomainfrom
atomic-directory-replace

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Feb 26, 2026

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

@jviotti jviotti force-pushed the atomic-directory-replace branch from dc6b61b to 67e723d Compare February 26, 2026 17:55
@augmentcode
Copy link

augmentcode bot commented Feb 26, 2026

🤖 Augment PR Summary

Summary: This PR introduces a new IO utility to replace a directory with another one using filesystem renames and rollback.

Changes:

  • Added public API declaration for sourcemeta::core::atomic_directory_replace in sourcemeta/core/io.h
  • Implemented directory replacement in src/lang/io/io.cc by renaming the original aside into a temporary “.backup-*” directory and then renaming the replacement into place
  • Ensures the backup is created in the original’s parent directory to avoid cross-volume issues (so renames can succeed on the same filesystem)
  • Added a new GoogleTest suite covering creation when the original is absent, replacement of an existing directory, nested content preservation, and ensuring no leftover backup remains
  • Registered the new unit test file in test/io/CMakeLists.txt

Technical Notes: The implementation relies on std::filesystem::rename (which requires same-filesystem semantics) and uses TemporaryDirectory RAII cleanup to remove the old directory after a successful swap.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@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. 3 suggestions posted.

Fix All in Augment

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


TemporaryDirectory backup{original.parent_path(), ".backup-"};
std::filesystem::remove(backup.path());
std::filesystem::rename(original, backup.path());
Copy link

Choose a reason for hiding this comment

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

original.parent_path() can be empty for relative paths like "original", which may cause TemporaryDirectory (and its internal create_directories) to throw unexpectedly. Consider guarding this case so callers can safely use relative directory paths too.

Severity: medium

Fix This in Augment

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

} catch (...) {
std::filesystem::rename(backup.path(), original);
throw;
}
Copy link

Choose a reason for hiding this comment

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

If the rollback std::filesystem::rename(backup.path(), original) throws inside this catch, the function can exit with original still moved aside, contradicting the “original is restored” guarantee in the header docs. Consider whether you want to handle/document rollback failure separately so the post-failure state is clear.

Severity: medium

Fix This in Augment

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


/// @ingroup io
///
/// Atomically replace one directory with another using rename-swap with
Copy link

Choose a reason for hiding this comment

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

The docs say “Atomically replace…”, but the implementation performs two renames with a window where original does not exist (after moving it to backup and before renaming replacement). Consider clarifying what atomicity guarantees are intended for concurrent readers of original.

Severity: low

Fix This in Augment

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

Copy link

@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.

1 issue found across 4 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/lang/io/io.cc">

<violation number="1" location="src/lang/io/io.cc:87">
P2: If `std::filesystem::rename(backup.path(), original)` throws inside the `catch` block, the original directory remains moved to the backup location and is effectively lost, contradicting the documented guarantee that "On failure, the original is restored from a temporary backup." Consider wrapping the rollback rename in a `try/catch` with a `noexcept` fallback or at minimum documenting that rollback itself can fail.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link

@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: d717dc3 Previous: 084769e Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 3.154439416671347 ns/iter 3.1130994687585556 ns/iter 1.01
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 3.112281511798543 ns/iter 3.1142801840055694 ns/iter 1.00
Regex_Period_Asterisk 3.1114694937781584 ns/iter 3.1114594087757914 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 3.1114258444889478 ns/iter 3.1122445970925305 ns/iter 1.00
Regex_Period_Plus 2.8928675857160657 ns/iter 2.917862112311563 ns/iter 0.99
Regex_Period 3.1105224519052967 ns/iter 3.1123063261841377 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 3.111156573786047 ns/iter 2.93369776890319 ns/iter 1.06
Regex_Caret_Group_Period_Plus_Group_Dollar 2.885951935991897 ns/iter 2.9309316865434516 ns/iter 0.98
Regex_Caret_Period_Asterisk_Dollar 3.73374461332567 ns/iter 2.8002727318940765 ns/iter 1.33
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.7360406401617166 ns/iter 2.800715434162387 ns/iter 1.33
Regex_Caret_X_Hyphen 10.582738399865269 ns/iter 10.268455118057627 ns/iter 1.03
Regex_Period_Md_Dollar 28.69642966156679 ns/iter 27.25971991442674 ns/iter 1.05
Regex_Caret_Slash_Period_Asterisk 7.471545778612932 ns/iter 7.467598756209426 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 4.044481557989254 ns/iter 4.0480337615990996 ns/iter 1.00
Regex_Nested_Backtrack 50.29560689999926 ns/iter 49.780206111230676 ns/iter 1.01
JSON_Array_Of_Objects_Unique 438.0269227652448 ns/iter 444.20352829773805 ns/iter 0.99
JSON_Parse_1 6465.7495488500535 ns/iter 6450.992712448106 ns/iter 1.00
JSON_Parse_Real 11393.374591456553 ns/iter 11601.117081962439 ns/iter 0.98
JSON_Parse_Decimal 12090.210688999794 ns/iter 11864.301190395345 ns/iter 1.02
JSON_Parse_Schema_ISO_Language 3665721.842931883 ns/iter 3679848.9267013306 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 61.65455584532692 ns/iter 61.607935175818156 ns/iter 1.00
JSON_Equality_Helm_Chart_Lock 159.79845679622824 ns/iter 175.09979490843148 ns/iter 0.91
JSON_Divisible_By_Decimal 599.0628816052782 ns/iter 616.6065807099951 ns/iter 0.97
JSON_String_Equal/10 6.560879251015313 ns/iter 6.542049320814701 ns/iter 1.00
JSON_String_Equal/100 7.173357567082615 ns/iter 7.169987217397587 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9357451143829785 ns/iter 0.9352696884408493 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 10.266342178590197 ns/iter 10.282056017461294 ns/iter 1.00
JSON_String_Fast_Hash/10 2.8014276404093446 ns/iter 2.8016942322264455 ns/iter 1.00
JSON_String_Fast_Hash/100 2.8006808789104793 ns/iter 2.80059390586394 ns/iter 1.00
JSON_String_Key_Hash/10 2.181280381144759 ns/iter 2.18643657426817 ns/iter 1.00
JSON_String_Key_Hash/100 6.53943644147648 ns/iter 6.536783315922257 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 3.7405228566807867 ns/iter 3.735530998915811 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 3.7449091032389723 ns/iter 3.737641135844506 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 3.737124775405423 ns/iter 3.737716698415651 ns/iter 1.00
Pointer_Object_Traverse 44.36196009004956 ns/iter 44.847476081632955 ns/iter 0.99
Pointer_Object_Try_Traverse 53.56636126308937 ns/iter 53.597929454167534 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 304.1230870497398 ns/iter 357.72319534770014 ns/iter 0.85
Pointer_Walker_Schema_ISO_Language 3544589.639784835 ns/iter 3168708.4162895926 ns/iter 1.12
Schema_Frame_WoT_References 4922009.812949915 ns/iter 4821910.662068494 ns/iter 1.02
Schema_Frame_OMC_References 22678788.166664768 ns/iter 19943924.971425988 ns/iter 1.14
Schema_Frame_OMC_Locations 20606638.45714186 ns/iter 18366271.605265483 ns/iter 1.12
Schema_Frame_ISO_Language_Locations 108903487.33333136 ns/iter 101662181.66667326 ns/iter 1.07
Schema_Frame_KrakenD_References 44286983.56250038 ns/iter 39885548.27777888 ns/iter 1.11
Schema_Frame_KrakenD_Reachable 649090977.0000144 ns/iter 579276746.9999944 ns/iter 1.12
Schema_Iterator_ISO_Language 2345174.2358804154 ns/iter 2408113.3749996605 ns/iter 0.97
Schema_Frame_ISO_Language_Locations_To_JSON 136859171.99998698 ns/iter 128874817.2499936 ns/iter 1.06
Schema_Tracker_ISO_Language 31875015.136361897 ns/iter 27146770.666666005 ns/iter 1.17
Schema_Tracker_ISO_Language_To_JSON 27855454.92307707 ns/iter 23665450.724138282 ns/iter 1.18
Schema_Format_ISO_Language_To_JSON 115742452.9999768 ns/iter 107918936.83333834 ns/iter 1.07
Schema_Bundle_Meta_2020_12 1649835.6197201698 ns/iter 1659375.8226927135 ns/iter 0.99
Schema_Frame_Many_Resources_References 378789337.99999005 ns/iter 363144744.5000049 ns/iter 1.04
Alterschema_Check_Readibility_ISO_Language_Set_3 224663828.99998888 ns/iter 215851829.99998173 ns/iter 1.04
Alterschema_Check_Readibility_OMC 35246704.10526572 ns/iter 32052240.227275517 ns/iter 1.10
Alterschema_Apply_Readibility_KrakenD 650686015.9998951 ns/iter 593995721.9999315 ns/iter 1.10
EditorSchema_ForEditor_EmbeddedResources 13619640.705883285 ns/iter 13485795.673086789 ns/iter 1.01
URITemplateRouter_Create 16440.96526413995 ns/iter 16862.453210695207 ns/iter 0.98
URITemplateRouter_Match 169.93979768861152 ns/iter 177.5409522598754 ns/iter 0.96
URITemplateRouterView_Restore 6807.16611518822 ns/iter 6795.840060182284 ns/iter 1.00
URITemplateRouterView_Match 146.11772290999247 ns/iter 153.15102590159535 ns/iter 0.95

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

Copy link

@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: d717dc3 Previous: 084769e Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.9314061446735693 ns/iter 1.719000456346059 ns/iter 1.12
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.0907417304239178 ns/iter 1.7686721178075313 ns/iter 1.18
Regex_Period_Asterisk 1.9918678059247135 ns/iter 1.7164968242958591 ns/iter 1.16
Regex_Group_Period_Asterisk_Group 1.79863942169945 ns/iter 1.764099815330634 ns/iter 1.02
Regex_Period_Plus 2.5138433249913814 ns/iter 2.2611130965270174 ns/iter 1.11
Regex_Period 2.1545309359977924 ns/iter 2.174625684699314 ns/iter 0.99
Regex_Caret_Period_Plus_Dollar 2.4039720329655263 ns/iter 2.240336029801376 ns/iter 1.07
Regex_Caret_Group_Period_Plus_Group_Dollar 2.3575438662517465 ns/iter 2.2967302313550144 ns/iter 1.03
Regex_Caret_Period_Asterisk_Dollar 1.8864703851374174 ns/iter 2.0819458593799225 ns/iter 0.91
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.9263548042546905 ns/iter 2.0156482723532854 ns/iter 0.96
Regex_Caret_X_Hyphen 8.17116740973566 ns/iter 7.032816412949695 ns/iter 1.16
Regex_Period_Md_Dollar 28.388729893349975 ns/iter 20.177881225954863 ns/iter 1.41
Regex_Caret_Slash_Period_Asterisk 7.213236847806956 ns/iter 5.850933383930017 ns/iter 1.23
Regex_Caret_Period_Range_Dollar 1.9726773420308499 ns/iter 1.7867422726839879 ns/iter 1.10
Regex_Nested_Backtrack 33.782491449987056 ns/iter 28.43179345468841 ns/iter 1.19
JSON_Array_Of_Objects_Unique 471.1286700951216 ns/iter 363.1916323206875 ns/iter 1.30
JSON_Parse_1 5664.3820899989805 ns/iter 4509.926752967501 ns/iter 1.26
JSON_Parse_Real 8858.450559120052 ns/iter 6734.099397965762 ns/iter 1.32
JSON_Parse_Decimal 10164.267159877978 ns/iter 8150.525565712286 ns/iter 1.25
JSON_Parse_Schema_ISO_Language 5974800.829999367 ns/iter 3501880.952381141 ns/iter 1.71
JSON_Fast_Hash_Helm_Chart_Lock 68.50082903776563 ns/iter 58.95975116273809 ns/iter 1.16
JSON_Equality_Helm_Chart_Lock 173.1988938325606 ns/iter 127.86642163206007 ns/iter 1.35
JSON_Divisible_By_Decimal 477.46368171781364 ns/iter 442.4358417545268 ns/iter 1.08
JSON_String_Equal/10 6.706789422795559 ns/iter 7.5856735125899135 ns/iter 0.88
JSON_String_Equal/100 8.238069953822531 ns/iter 7.6166591756329725 ns/iter 1.08
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9935753048422635 ns/iter 0.811323386716512 ns/iter 1.22
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.7726216773818733 ns/iter 3.5022906609149485 ns/iter 1.08
JSON_String_Fast_Hash/10 2.4412817668722853 ns/iter 3.2255253473799286 ns/iter 0.76
JSON_String_Fast_Hash/100 2.0203535826745083 ns/iter 2.3304446267384384 ns/iter 0.87
JSON_String_Key_Hash/10 1.3071312443519616 ns/iter 1.5300196060259998 ns/iter 0.85
JSON_String_Key_Hash/100 2.095632990557764 ns/iter 2.2725207151269413 ns/iter 0.92
JSON_Object_Defines_Miss_Same_Length 2.244821419723405 ns/iter 2.499314741010653 ns/iter 0.90
JSON_Object_Defines_Miss_Too_Small 2.277743757781917 ns/iter 2.722307920191623 ns/iter 0.84
JSON_Object_Defines_Miss_Too_Large 2.6252860569978087 ns/iter 2.663719996639362 ns/iter 0.99
Pointer_Object_Traverse 14.752536463489555 ns/iter 19.3401001830732 ns/iter 0.76
Pointer_Object_Try_Traverse 21.20546616370397 ns/iter 20.601099102274013 ns/iter 1.03
Pointer_Push_Back_Pointer_To_Weak_Pointer 172.37237295100516 ns/iter 160.1205160415764 ns/iter 1.08
Pointer_Walker_Schema_ISO_Language 6066066.526314947 ns/iter 4283442.909091016 ns/iter 1.42
Schema_Frame_WoT_References 5654411.6290322775 ns/iter 4483841.828025373 ns/iter 1.26
Schema_Frame_OMC_References 33175992.739129275 ns/iter 22234283.03448302 ns/iter 1.49
Schema_Frame_OMC_Locations 28535388.319996852 ns/iter 23391089.06896227 ns/iter 1.22
Schema_Frame_ISO_Language_Locations 86776041.66666697 ns/iter 90341624.99999963 ns/iter 0.96
Schema_Frame_KrakenD_References 54272239.58332661 ns/iter 55146602.53846579 ns/iter 0.98
Schema_Frame_KrakenD_Reachable 546649208.999952 ns/iter 610887541.9998868 ns/iter 0.89
Schema_Iterator_ISO_Language 2568664.1014490505 ns/iter 3010599.2480311734 ns/iter 0.85
Schema_Frame_ISO_Language_Locations_To_JSON 101853715.33331515 ns/iter 112810826.33333503 ns/iter 0.90
Schema_Tracker_ISO_Language 32040114.59999947 ns/iter 40451257.352936625 ns/iter 0.79
Schema_Tracker_ISO_Language_To_JSON 14985067.837208822 ns/iter 17267082.216218676 ns/iter 0.87
Schema_Format_ISO_Language_To_JSON 82571555.44444889 ns/iter 100736722.49999769 ns/iter 0.82
Schema_Bundle_Meta_2020_12 1448924.8865603444 ns/iter 1515461.7536262348 ns/iter 0.96
Schema_Frame_Many_Resources_References 326097478.99994093 ns/iter 307990062.5000391 ns/iter 1.06
Alterschema_Check_Readibility_ISO_Language_Set_3 182104416.49995345 ns/iter 147390266.5999958 ns/iter 1.24
Alterschema_Check_Readibility_OMC 39303192.1666736 ns/iter 35421274.59091014 ns/iter 1.11
Alterschema_Apply_Readibility_KrakenD 522331125.00016433 ns/iter 527500791.5000174 ns/iter 0.99
EditorSchema_ForEditor_EmbeddedResources 12142117.828126686 ns/iter 11372619.333340853 ns/iter 1.07
URITemplateRouter_Create 18519.697141892633 ns/iter 16968.259480992718 ns/iter 1.09
URITemplateRouter_Match 212.14927726951845 ns/iter 170.53910990046936 ns/iter 1.24
URITemplateRouterView_Restore 15614.719728437529 ns/iter 13465.820980615734 ns/iter 1.16
URITemplateRouterView_Match 152.04812883556562 ns/iter 143.89493263891796 ns/iter 1.06

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

Copy link

@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: d717dc3 Previous: 084769e Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 3.0569857142848735 ns/iter 4.136108904402716 ns/iter 0.74
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.851381605869868 ns/iter 4.104880511559427 ns/iter 0.69
Regex_Period_Asterisk 3.208057589285472 ns/iter 4.74948081417405 ns/iter 0.68
Regex_Group_Period_Asterisk_Group 3.0150218750009117 ns/iter 4.438217499999553 ns/iter 0.68
Regex_Period_Plus 3.5078963338047315 ns/iter 5.080769999999575 ns/iter 0.69
Regex_Period 3.5045268240996066 ns/iter 5.065041000000292 ns/iter 0.69
Regex_Caret_Period_Plus_Dollar 3.2156887550235598 ns/iter 4.751399063560102 ns/iter 0.68
Regex_Caret_Group_Period_Plus_Group_Dollar 2.921346268408682 ns/iter 4.4314906250008335 ns/iter 0.66
Regex_Caret_Period_Asterisk_Dollar 2.975885355813842 ns/iter 4.424169375000986 ns/iter 0.67
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.8369574292369024 ns/iter 4.116040275208087 ns/iter 0.69
Regex_Caret_X_Hyphen 5.882642857140955 ns/iter 7.264285714284771 ns/iter 0.81
Regex_Period_Md_Dollar 32.097942689028415 ns/iter 35.71438435905321 ns/iter 0.90
Regex_Caret_Slash_Period_Asterisk 5.611006249998646 ns/iter 6.970881696428677 ns/iter 0.80
Regex_Caret_Period_Range_Dollar 3.3795859761081655 ns/iter 4.119268801998079 ns/iter 0.82
Regex_Nested_Backtrack 91.2811941964163 ns/iter 101.28164062500389 ns/iter 0.90
JSON_Array_Of_Objects_Unique 453.33133690487614 ns/iter 496.3113392857313 ns/iter 0.91
JSON_Parse_1 9754.571428572945 ns/iter 8954.310471825846 ns/iter 1.09
JSON_Parse_Real 14580.089285714288 ns/iter 16162.700892858236 ns/iter 0.90
JSON_Parse_Decimal 16208.657647260565 ns/iter 15948.14250988137 ns/iter 1.02
JSON_Parse_Schema_ISO_Language 8184525.555553691 ns/iter 6404696.428573078 ns/iter 1.28
JSON_Fast_Hash_Helm_Chart_Lock 50.1567199999954 ns/iter 66.16233928572309 ns/iter 0.76
JSON_Equality_Helm_Chart_Lock 241.8598437500208 ns/iter 261.85844919005916 ns/iter 0.92
JSON_Divisible_By_Decimal 1215.2237499999987 ns/iter 1155.5820312498356 ns/iter 1.05
JSON_String_Equal/10 10.34350937499795 ns/iter 12.315035714286589 ns/iter 0.84
JSON_String_Equal/100 12.262266071429297 ns/iter 12.957307142857287 ns/iter 0.95
JSON_String_Equal_Small_By_Perfect_Hash/10 1.462961249347047 ns/iter 1.892067055260408 ns/iter 0.77
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 9.671485937502666 ns/iter 12.582341071427956 ns/iter 0.77
JSON_String_Fast_Hash/10 2.63766914943106 ns/iter 3.7815892857143547 ns/iter 0.70
JSON_String_Fast_Hash/100 2.6547822297731156 ns/iter 3.793819814654286 ns/iter 0.70
JSON_String_Key_Hash/10 2.9470259558745457 ns/iter 4.276083043349556 ns/iter 0.69
JSON_String_Key_Hash/100 13.929490786031655 ns/iter 16.657877232145577 ns/iter 0.84
JSON_Object_Defines_Miss_Same_Length 3.361805261853539 ns/iter 3.4994383419656194 ns/iter 0.96
JSON_Object_Defines_Miss_Too_Small 4.745765090345095 ns/iter 5.065672999999151 ns/iter 0.94
JSON_Object_Defines_Miss_Too_Large 3.8316395089285242 ns/iter 4.115082105562178 ns/iter 0.93
Pointer_Object_Traverse 48.6818876204225 ns/iter 53.048980000016854 ns/iter 0.92
Pointer_Object_Try_Traverse 62.79703571428692 ns/iter 73.16425223216072 ns/iter 0.86
Pointer_Push_Back_Pointer_To_Weak_Pointer 173.34473928647995 ns/iter 167.65884381640248 ns/iter 1.03
Pointer_Walker_Schema_ISO_Language 14565616.071426542 ns/iter 12852141.071432145 ns/iter 1.13
Schema_Frame_WoT_References 10386387.499998761 ns/iter 10928326.785716536 ns/iter 0.95
Schema_Frame_OMC_References 43165686.66666474 ns/iter 45328028.57142673 ns/iter 0.95
Schema_Frame_OMC_Locations 38442099.9999915 ns/iter 41711250.00000586 ns/iter 0.92
Schema_Frame_ISO_Language_Locations 200117066.66665912 ns/iter 209739900.00000715 ns/iter 0.95
Schema_Frame_KrakenD_References 89074100.00001115 ns/iter 95799957.14284451 ns/iter 0.93
Schema_Frame_KrakenD_Reachable 598704799.9999504 ns/iter 575204199.9999164 ns/iter 1.04
Schema_Iterator_ISO_Language 4927027.586207824 ns/iter 4905864.999998357 ns/iter 1.00
Schema_Frame_ISO_Language_Locations_To_JSON 284724299.9999935 ns/iter 268027050.0000006 ns/iter 1.06
Schema_Tracker_ISO_Language 51596850.00000991 ns/iter 49858971.42856694 ns/iter 1.03
Schema_Tracker_ISO_Language_To_JSON 57000736.36363744 ns/iter 56740581.8181793 ns/iter 1.00
Schema_Format_ISO_Language_To_JSON 199723466.6667585 ns/iter 211737633.33323827 ns/iter 0.94
Schema_Bundle_Meta_2020_12 2701459.8484966382 ns/iter 2886664.4067817507 ns/iter 0.94
Schema_Frame_Many_Resources_References 1372880599.9999168 ns/iter 1585263999.9998245 ns/iter 0.87
Alterschema_Check_Readibility_ISO_Language_Set_3 317014349.9999085 ns/iter 345183599.9999275 ns/iter 0.92
Alterschema_Check_Readibility_OMC 57359936.363644175 ns/iter 64583718.18181066 ns/iter 0.89
Alterschema_Apply_Readibility_KrakenD 1003775299.9999157 ns/iter 1113835500.00005 ns/iter 0.90
EditorSchema_ForEditor_EmbeddedResources 25858221.428571988 ns/iter 32200631.81817585 ns/iter 0.80
URITemplateRouter_Create 21671.987499999545 ns/iter 22664.537499998973 ns/iter 0.96
URITemplateRouter_Match 221.61108017735393 ns/iter 218.83968749996538 ns/iter 1.01
URITemplateRouterView_Restore 24089.742857142937 ns/iter 33178.24028500002 ns/iter 0.73
URITemplateRouterView_Match 157.35233672534784 ns/iter 157.6512053571122 ns/iter 1.00

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

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

@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: d717dc3 Previous: 084769e Ratio
URITemplateRouter_Create 14844.8826098126 ns/iter 14847.409300446903 ns/iter 1.00
URITemplateRouter_Match 157.6234496230748 ns/iter 157.08829604627454 ns/iter 1.00
URITemplateRouterView_Restore 7980.2844298069385 ns/iter 8451.822615296122 ns/iter 0.94
URITemplateRouterView_Match 127.71593279166635 ns/iter 129.05347631935877 ns/iter 0.99
EditorSchema_ForEditor_EmbeddedResources 14124803.999989126 ns/iter 14147077.000015998 ns/iter 1.00
Alterschema_Check_Readibility_ISO_Language_Set_3 211730408.99998343 ns/iter 206556654.666656 ns/iter 1.03
Alterschema_Check_Readibility_OMC 34357849.00000272 ns/iter 34383737.28571215 ns/iter 1.00
Alterschema_Apply_Readibility_KrakenD 596570149.9999341 ns/iter 589885207.9999415 ns/iter 1.01
Schema_Frame_WoT_References 5369826.946153249 ns/iter 5411525.603053529 ns/iter 0.99
Schema_Frame_OMC_References 22158489.500000656 ns/iter 22101067.45161694 ns/iter 1.00
Schema_Frame_OMC_Locations 20319474.451613836 ns/iter 20457401.058827013 ns/iter 0.99
Schema_Frame_ISO_Language_Locations 101761098.42856412 ns/iter 100746545.14284833 ns/iter 1.01
Schema_Frame_KrakenD_References 39948934.64705991 ns/iter 40085766.49999264 ns/iter 1.00
Schema_Frame_KrakenD_Reachable 590229942.9999403 ns/iter 588554142.9997829 ns/iter 1.00
Schema_Iterator_ISO_Language 2670043.3893126035 ns/iter 2694319.335906799 ns/iter 0.99
Schema_Frame_ISO_Language_Locations_To_JSON 250613657.66669044 ns/iter 251038519.33333015 ns/iter 1.00
Schema_Tracker_ISO_Language 29559758.83333887 ns/iter 27864867.16000582 ns/iter 1.06
Schema_Tracker_ISO_Language_To_JSON 27523675.15385091 ns/iter 27115399.38461381 ns/iter 1.02
Schema_Format_ISO_Language_To_JSON 109187903.66671753 ns/iter 108363019.83332913 ns/iter 1.01
Schema_Bundle_Meta_2020_12 1897672.3070671184 ns/iter 1887772.0835586041 ns/iter 1.01
Schema_Frame_Many_Resources_References 382820829.0000248 ns/iter 382303852.00006366 ns/iter 1.00
Pointer_Object_Traverse 27.16153954193945 ns/iter 27.276987057052725 ns/iter 1.00
Pointer_Object_Try_Traverse 27.242353054608113 ns/iter 27.262533302707695 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 171.99528381895763 ns/iter 163.81642687343128 ns/iter 1.05
Pointer_Walker_Schema_ISO_Language 3532967.0886693494 ns/iter 3511946.7699996675 ns/iter 1.01
JSON_Array_Of_Objects_Unique 407.59758720798936 ns/iter 401.6991386047352 ns/iter 1.01
JSON_Parse_1 8405.421079239311 ns/iter 8384.453844676555 ns/iter 1.00
JSON_Parse_Real 12889.815717859374 ns/iter 12497.890244341283 ns/iter 1.03
JSON_Parse_Decimal 18798.698454441655 ns/iter 18687.222198583026 ns/iter 1.01
JSON_Parse_Schema_ISO_Language 4611791.25657832 ns/iter 4649994.899999305 ns/iter 0.99
JSON_Fast_Hash_Helm_Chart_Lock 53.71684931768661 ns/iter 53.02267522748248 ns/iter 1.01
JSON_Equality_Helm_Chart_Lock 158.34058308975762 ns/iter 155.88253248664097 ns/iter 1.02
JSON_Divisible_By_Decimal 586.4268006281359 ns/iter 577.3486710402733 ns/iter 1.02
JSON_String_Equal/10 6.303936970915421 ns/iter 6.308524945344453 ns/iter 1.00
JSON_String_Equal/100 6.931632608285576 ns/iter 6.932953319973345 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 0.6256170396511516 ns/iter 0.6240288898280703 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 13.461742219766474 ns/iter 13.771600769659674 ns/iter 0.98
JSON_String_Fast_Hash/10 1.9044986611021784 ns/iter 1.9071350041956643 ns/iter 1.00
JSON_String_Fast_Hash/100 1.9041619165589996 ns/iter 1.9075641667361838 ns/iter 1.00
JSON_String_Key_Hash/10 1.2452880666573936 ns/iter 1.247645984539109 ns/iter 1.00
JSON_String_Key_Hash/100 12.434226485353552 ns/iter 12.441723364207194 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 3.4218703919998523 ns/iter 3.425226538338537 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 3.421758635241756 ns/iter 3.4250468838016075 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 3.427762291607219 ns/iter 3.4279974129816435 ns/iter 1.00
Regex_Lower_S_Or_Upper_S_Asterisk 3.1091109127612864 ns/iter 3.1133446670774356 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 3.110329408506126 ns/iter 3.1125540454958536 ns/iter 1.00
Regex_Period_Asterisk 3.111119134677162 ns/iter 3.1136829046955365 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 3.110986821503124 ns/iter 3.113291933846417 ns/iter 1.00
Regex_Period_Plus 2.799499885906762 ns/iter 2.803945311400838 ns/iter 1.00
Regex_Period 2.800006323566952 ns/iter 2.8065761584072417 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 2.800335331368302 ns/iter 2.801241688240301 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 2.799970322064887 ns/iter 2.8042440788432463 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 4.044051591007687 ns/iter 4.043880515824571 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 4.048617460650708 ns/iter 4.044156119470544 ns/iter 1.00
Regex_Caret_X_Hyphen 13.682178093648371 ns/iter 13.069715352619061 ns/iter 1.05
Regex_Period_Md_Dollar 35.93489733112411 ns/iter 35.69590987410506 ns/iter 1.01
Regex_Caret_Slash_Period_Asterisk 7.78032830535853 ns/iter 7.781602078749533 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 4.043894364811116 ns/iter 4.044072686007062 ns/iter 1.00
Regex_Nested_Backtrack 58.1878150145885 ns/iter 60.93720487025514 ns/iter 0.95

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

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti force-pushed the atomic-directory-replace branch from 67e723d to d717dc3 Compare February 26, 2026 18:25
@jviotti jviotti merged commit 120af1f into main Feb 26, 2026
12 checks passed
@jviotti jviotti deleted the atomic-directory-replace branch February 26, 2026 18:54
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