diff --git a/.gitignore b/.gitignore index f605d45995..386360237a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ air/target *.wasm !./artifacts/*.wasm + +benches/performance_metering/* diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index c12f15d6f9..0000000000 --- a/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "benches/performance_metering"] - path = benches/performance_metering - url = git@github.com:fluencelabs/aquavm-benchmark-data.git - branch = tmp/sigs-with-blake2 diff --git a/benches/PERFORMANCE.json b/benches/PERFORMANCE.json index 5d9ab4e509..7f9ccda283 100644 --- a/benches/PERFORMANCE.json +++ b/benches/PERFORMANCE.json @@ -1195,6 +1195,880 @@ "platform": "Linux-5.15.0-60-generic-x86_64-with-glibc2.35", "version": "0.35.1" }, + "88756ca30bfb93b0da6a64252adc98fc3e97e142c3b4970af3d2948fd66107b4": { + "benches": { + "big-values-data": { + "comment": "Loading a trace with huge values", + "memory_sizes": [ + "58.938 MiB", + "58.938 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "19.60ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "6.99ms", + "nested": { + "from_slice": "6.92ms" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "259.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "23.00µs", + "air_parser::parser::air_parser::parse": "21.00µs" + } + }, + "runner::execute": "11.00µs", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "5.59ms", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "5.55ms", + "nested": { + "populate_outcome_from_contexts": "5.49ms" + } + } + } + }, + "signing_step::sign_produced_cids": "186.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "6.38ms", + "nested": { + "verify": "5.75ms" + } + } + } + } + }, + "total_time": "19.60ms" + }, + "canon-map-key-by-lens": { + "comment": "benchmarking a map insert operation", + "memory_sizes": [ + "56.625 MiB", + "56.625 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "16.20ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "4.01ms", + "nested": { + "from_slice": "3.96ms" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "613.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "347.00µs", + "air_parser::parser::air_parser::parse": "55.00µs" + } + }, + "runner::execute": "2.76ms", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "3.22ms", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "3.19ms", + "nested": { + "populate_outcome_from_contexts": "2.78ms" + } + } + } + }, + "signing_step::sign_produced_cids": "186.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "5.30ms", + "nested": { + "verify": "4.68ms" + } + } + } + } + }, + "total_time": "16.20ms" + }, + "canon-map-key-element-by-lens": { + "comment": "benchmarking a map insert operation", + "memory_sizes": [ + "56.625 MiB", + "56.625 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "16.20ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "3.98ms", + "nested": { + "from_slice": "3.93ms" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "610.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "344.00µs", + "air_parser::parser::air_parser::parse": "56.00µs" + } + }, + "runner::execute": "2.76ms", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "3.20ms", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "3.18ms", + "nested": { + "populate_outcome_from_contexts": "2.78ms" + } + } + } + }, + "signing_step::sign_produced_cids": "185.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "5.30ms", + "nested": { + "verify": "4.68ms" + } + } + } + } + }, + "total_time": "16.20ms" + }, + "canon-map-multiple-keys": { + "comment": "benchmarking a map insert operation", + "memory_sizes": [ + "54.500 MiB", + "54.500 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "13.20ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "349.00µs", + "nested": { + "from_slice": "306.00µs" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "262.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "15.00µs", + "air_parser::parser::air_parser::parse": "44.00µs" + } + }, + "runner::execute": "8.88ms", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "2.70ms", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "2.68ms", + "nested": { + "populate_outcome_from_contexts": "2.36ms" + } + } + } + }, + "signing_step::sign_produced_cids": "184.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "636.00µs", + "nested": { + "verify": "26.00µs" + } + } + } + } + }, + "total_time": "13.20ms" + }, + "canon-map-scalar-multiple-keys": { + "comment": "benchmarking a map insert operation", + "memory_sizes": [ + "53.125 MiB", + "53.125 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "5.52ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "365.00µs", + "nested": { + "from_slice": "312.00µs" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "284.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "19.00µs", + "air_parser::parser::air_parser::parse": "47.00µs" + } + }, + "runner::execute": "3.34ms", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "536.00µs", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "505.00µs", + "nested": { + "populate_outcome_from_contexts": "452.00µs" + } + } + } + }, + "signing_step::sign_produced_cids": "191.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "650.00µs", + "nested": { + "verify": "31.00µs" + } + } + } + } + }, + "total_time": "5.52ms" + }, + "canon-map-scalar-single-key": { + "comment": "benchmarking a map insert operation", + "memory_sizes": [ + "53.000 MiB", + "53.000 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "4.46ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "370.00µs", + "nested": { + "from_slice": "324.00µs" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "262.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "16.00µs", + "air_parser::parser::air_parser::parse": "40.00µs" + } + }, + "runner::execute": "2.32ms", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "513.00µs", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "490.00µs", + "nested": { + "populate_outcome_from_contexts": "434.00µs" + } + } + } + }, + "signing_step::sign_produced_cids": "185.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "680.00µs", + "nested": { + "verify": "69.00µs" + } + } + } + } + }, + "total_time": "4.46ms" + }, + "canon-map-single-key": { + "comment": "benchmarking a map insert operation", + "memory_sizes": [ + "55.312 MiB", + "55.312 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "11.30ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "366.00µs", + "nested": { + "from_slice": "323.00µs" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "257.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "15.00µs", + "air_parser::parser::air_parser::parse": "40.00µs" + } + }, + "runner::execute": "6.70ms", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "3.01ms", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "2.98ms", + "nested": { + "populate_outcome_from_contexts": "2.71ms" + } + } + } + }, + "signing_step::sign_produced_cids": "185.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "678.00µs", + "nested": { + "verify": "68.00µs" + } + } + } + } + }, + "total_time": "11.30ms" + }, + "dashboard": { + "comment": "big dashboard test", + "memory_sizes": [ + "52.625 MiB", + "52.625 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "10.70ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "1.43ms", + "nested": { + "from_slice": "1.37ms" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "384.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "41.00µs", + "air_parser::parser::air_parser::parse": "135.00µs" + } + }, + "runner::execute": { + "common_prefix": "air::execution_step::instructions::call::resolved_call::serde_json", + "duration": "2.28ms", + "nested": { + "to_string(tetraplets)": "471.00µs" + } + }, + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "834.00µs", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "810.00µs", + "nested": { + "populate_outcome_from_contexts": "753.00µs" + } + } + } + }, + "signing_step::sign_produced_cids": "187.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "5.46ms", + "nested": { + "verify": "223.00µs" + } + } + } + } + }, + "total_time": "10.70ms" + }, + "long-data": { + "comment": "Long data trace", + "memory_sizes": [ + "53.812 MiB", + "53.812 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "6.81ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "2.40ms", + "nested": { + "from_slice": "2.35ms" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "264.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "44.00µs", + "air_parser::parser::air_parser::parse": "17.00µs" + } + }, + "runner::execute": "10.00µs", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "1.17ms", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "1.15ms", + "nested": { + "populate_outcome_from_contexts": "1.11ms" + } + } + } + }, + "signing_step::sign_produced_cids": "190.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "2.65ms", + "nested": { + "verify": "949.00µs" + } + } + } + } + }, + "total_time": "6.81ms" + }, + "multiple-cids10": { + "comment": "verifying multiple CIDs for single peer", + "memory_sizes": [ + "52.438 MiB", + "52.438 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "3.78ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "495.00µs", + "nested": { + "from_slice": "435.00µs" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "286.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "34.00µs", + "air_parser::parser::air_parser::parse": "44.00µs" + } + }, + "runner::execute": { + "common_prefix": "air::execution_step::instructions::call::resolved_call::serde_json", + "duration": "578.00µs", + "nested": { + "to_string(tetraplets)": "14.00µs" + } + }, + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "537.00µs", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "513.00µs", + "nested": { + "populate_outcome_from_contexts": "452.00µs" + } + } + } + }, + "signing_step::sign_produced_cids": "185.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "1.57ms", + "nested": { + "verify": "259.00µs" + } + } + } + } + }, + "total_time": "3.78ms" + }, + "multiple-peers8": { + "comment": "verifying many CIDs for many peers", + "memory_sizes": [ + "53.375 MiB", + "53.375 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "15.50ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "1.85ms", + "nested": { + "from_slice": "1.78ms" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "408.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "143.00µs", + "air_parser::parser::air_parser::parse": "51.00µs" + } + }, + "runner::execute": { + "common_prefix": "air::execution_step::instructions::call::resolved_call::serde_json", + "duration": "3.92ms", + "nested": { + "to_string(tetraplets)": "17.00µs" + } + }, + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "1.59ms", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "1.56ms", + "nested": { + "populate_outcome_from_contexts": "1.44ms" + } + } + } + }, + "signing_step::sign_produced_cids": "193.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "7.44ms", + "nested": { + "verify": "1.23ms" + } + } + } + } + }, + "total_time": "15.50ms" + }, + "multiple-sigs30": { + "comment": "signing multiple CIDs", + "memory_sizes": [ + "56.188 MiB", + "56.188 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "26.00ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "5.05ms", + "nested": { + "from_slice": "4.98ms" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "500.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "230.00µs", + "air_parser::parser::air_parser::parse": "57.00µs" + } + }, + "runner::execute": "10.30ms", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "4.21ms", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "4.18ms", + "nested": { + "populate_outcome_from_contexts": "3.99ms" + } + } + } + }, + "signing_step::sign_produced_cids": "781.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "5.00ms", + "nested": { + "verify": "2.14ms" + } + } + } + } + }, + "total_time": "26.00ms" + }, + "network-explore": { + "comment": "5 peers of network are discovered", + "memory_sizes": [ + "52.375 MiB", + "52.375 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "5.14ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "666.00µs", + "nested": { + "from_slice": "603.00µs" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "299.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "22.00µs", + "air_parser::parser::air_parser::parse": "65.00µs" + } + }, + "runner::execute": { + "common_prefix": "air::execution_step::instructions::call::resolved_call::serde_json", + "duration": "187.00µs", + "nested": { + "to_string(tetraplets)": "14.00µs" + } + }, + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "459.00µs", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "434.00µs", + "nested": { + "populate_outcome_from_contexts": "388.00µs" + } + } + } + }, + "signing_step::sign_produced_cids": "200.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "3.20ms", + "nested": { + "verify": "66.00µs" + } + } + } + } + }, + "total_time": "5.14ms" + }, + "populate-map": { + "comment": "benchmarking a map insert operation", + "memory_sizes": [ + "51.938 MiB", + "51.938 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "3.81ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "130.00µs", + "nested": { + "from_slice": "91.00µs" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "278.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "16.00µs", + "air_parser::parser::air_parser::parse": "49.00µs" + } + }, + "runner::execute": "2.83ms", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "423.00µs", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "398.00µs", + "nested": { + "populate_outcome_from_contexts": "349.00µs" + } + } + } + }, + "signing_step::sign_produced_cids": "10.00µs", + "verification_step::verify": "13.00µs" + } + } + }, + "total_time": "3.81ms" + }, + "populate-map-multiple-keys": { + "comment": "benchmarking a map insert operation", + "memory_sizes": [ + "53.000 MiB", + "53.000 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "4.63ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "139.00µs", + "nested": { + "from_slice": "94.00µs" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "266.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "16.00µs", + "air_parser::parser::air_parser::parse": "47.00µs" + } + }, + "runner::execute": "2.83ms", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "439.00µs", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "416.00µs", + "nested": { + "populate_outcome_from_contexts": "373.00µs" + } + } + } + }, + "signing_step::sign_produced_cids": "184.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "636.00µs", + "nested": { + "verify": "26.00µs" + } + } + } + } + }, + "total_time": "4.63ms" + }, + "populate-map-single-key": { + "comment": "benchmarking a map insert operation", + "memory_sizes": [ + "52.875 MiB", + "52.875 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "3.77ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "195.00µs", + "nested": { + "from_slice": "152.00µs" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "263.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "16.00µs", + "air_parser::parser::air_parser::parse": "43.00µs" + } + }, + "runner::execute": "1.86ms", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "456.00µs", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "433.00µs", + "nested": { + "populate_outcome_from_contexts": "378.00µs" + } + } + } + }, + "signing_step::sign_produced_cids": "185.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "684.00µs", + "nested": { + "verify": "68.00µs" + } + } + } + } + }, + "total_time": "3.77ms" + } + }, + "datetime": "2023-11-08 08:53:43.189029+00:00", + "features": "", + "platform": "Linux-6.5.9-arch2-1-x86_64-with-glibc2.35", + "version": "0.54.0" + }, "c1f3ea5950db0a10b44da931c25774d64ab25084f47d504f72f311e694550ff1": { "benches": { "big_values_data": { @@ -1238,79 +2112,194 @@ "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "105.40ms", + "duration": "105.40ms", + "nested": { + "farewell_step::outcome::from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "549.00µs", + "nested": { + "populate_outcome_from_contexts": { + "common_prefix": "air::farewell_step::outcome::serde_json", + "duration": "488.00µs", + "nested": { + "to_vec(call_results)": "43.00µs", + "to_vec(data)": "234.00µs" + } + } + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "1.31ms", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "64.00µs", + "air_interpreter_data::interpreter_data::serde_json::from_slice": "737.00µs", + "air_parser::parser::air_parser::parse": "276.00µs" + } + }, + "runner::execute": { + "common_prefix": "air::execution_step::instructions::call", + "duration": "103.00ms", + "nested": { + "execute": { + "common_prefix": "air::execution_step::instructions::call::resolved_call", + "duration": "92.47ms", + "nested": { + "execute": { + "common_prefix": "air::execution_step", + "duration": "9.52ms", + "nested": { + "instructions::call::resolved_call::prepare_request_params": { + "common_prefix": "air::execution_step", + "duration": "799.00µs", + "nested": { + "instructions::call::resolved_call::serde_json::to_string(tetraplets)": "51.00µs", + "resolver::resolve::resolve_ast_variable": { + "common_prefix": "air::execution_step::resolver::resolve", + "duration": "460.00µs", + "nested": { + "resolve_variable": "145.00µs" + } + } + } + }, + "resolver::resolve::resolve_ast_variable": { + "common_prefix": "air::execution_step::resolver::resolve", + "duration": "1.42ms", + "nested": { + "resolve_variable": "477.00µs" + } + } + } + }, + "new": { + "common_prefix": "air::execution_step::resolver::resolve", + "duration": "59.93ms", + "nested": { + "resolve_ast_scalar": { + "common_prefix": "air::execution_step::resolver::resolve", + "duration": "44.46ms", + "nested": { + "resolve_ast_variable": { + "common_prefix": "air::execution_step::resolver::resolve", + "duration": "27.31ms", + "nested": { + "resolve_variable": "8.72ms" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "total_time": "105.40ms" + }, + "long_data": { + "comment": "Long data trace", + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "4.47ms", + "nested": { + "farewell_step::outcome::from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "1.38ms", + "nested": { + "populate_outcome_from_contexts": { + "common_prefix": "air::farewell_step::outcome::serde_json", + "duration": "1.27ms", + "nested": { + "to_vec(call_results)": "20.00µs", + "to_vec(data)": "652.00µs" + } + } + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "2.82ms", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "64.00µs", + "air_interpreter_data::interpreter_data::serde_json::from_slice": "2.53ms", + "air_parser::parser::air_parser::parse": "63.00µs" + } + }, + "runner::execute": "25.00µs" + } + } + }, + "total_time": "4.47ms" + }, + "network_explore": { + "comment": "5 peers of network are discovered", + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "9.70ms", "nested": { "farewell_step::outcome::from_success_result": { "common_prefix": "air::farewell_step::outcome", - "duration": "549.00µs", + "duration": "291.00µs", "nested": { "populate_outcome_from_contexts": { "common_prefix": "air::farewell_step::outcome::serde_json", - "duration": "488.00µs", + "duration": "230.00µs", "nested": { - "to_vec(call_results)": "43.00µs", - "to_vec(data)": "234.00µs" + "to_vec(call_results)": "26.00µs", + "to_vec(data)": "79.00µs" } } } }, "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "1.31ms", + "duration": "847.00µs", "nested": { "air::preparation_step::preparation::make_exec_ctx": "64.00µs", - "air_interpreter_data::interpreter_data::serde_json::from_slice": "737.00µs", - "air_parser::parser::air_parser::parse": "276.00µs" + "air_interpreter_data::interpreter_data::serde_json::from_slice": "315.00µs", + "air_parser::parser::air_parser::parse": "206.00µs" } }, "runner::execute": { "common_prefix": "air::execution_step::instructions::call", - "duration": "103.00ms", + "duration": "8.29ms", "nested": { "execute": { "common_prefix": "air::execution_step::instructions::call::resolved_call", - "duration": "92.47ms", + "duration": "7.28ms", "nested": { "execute": { - "common_prefix": "air::execution_step", - "duration": "9.52ms", + "common_prefix": "air::execution_step::resolver::resolve", + "duration": "1.28ms", "nested": { - "instructions::call::resolved_call::prepare_request_params": { - "common_prefix": "air::execution_step", - "duration": "799.00µs", - "nested": { - "instructions::call::resolved_call::serde_json::to_string(tetraplets)": "51.00µs", - "resolver::resolve::resolve_ast_variable": { - "common_prefix": "air::execution_step::resolver::resolve", - "duration": "460.00µs", - "nested": { - "resolve_variable": "145.00µs" - } - } - } - }, - "resolver::resolve::resolve_ast_variable": { + "resolve_ast_variable": { "common_prefix": "air::execution_step::resolver::resolve", - "duration": "1.42ms", + "duration": "497.00µs", "nested": { - "resolve_variable": "477.00µs" + "resolve_variable": "155.00µs" } } } }, "new": { "common_prefix": "air::execution_step::resolver::resolve", - "duration": "59.93ms", + "duration": "4.24ms", "nested": { "resolve_ast_scalar": { "common_prefix": "air::execution_step::resolver::resolve", - "duration": "44.46ms", + "duration": "2.99ms", "nested": { "resolve_ast_variable": { "common_prefix": "air::execution_step::resolver::resolve", - "duration": "27.31ms", + "duration": "1.81ms", "nested": { - "resolve_variable": "8.72ms" + "resolve_variable": "569.00µs" } } } @@ -1324,230 +2313,433 @@ } } }, - "total_time": "105.40ms" + "total_time": "9.70ms" }, - "long_data": { - "comment": "Long data trace", + "parser_10000_100": { + "comment": "Running very long AIR script with lot of variables and assignments", "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "4.47ms", + "duration": "33.06ms", "nested": { "farewell_step::outcome::from_success_result": { "common_prefix": "air::farewell_step::outcome", - "duration": "1.38ms", + "duration": "207.00µs", "nested": { "populate_outcome_from_contexts": { "common_prefix": "air::farewell_step::outcome::serde_json", - "duration": "1.27ms", + "duration": "158.00µs", "nested": { - "to_vec(call_results)": "20.00µs", - "to_vec(data)": "652.00µs" + "to_vec(call_results)": "18.00µs", + "to_vec(data)": "47.00µs" } } } }, "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "2.82ms", + "duration": "30.52ms", "nested": { - "air::preparation_step::preparation::make_exec_ctx": "64.00µs", - "air_interpreter_data::interpreter_data::serde_json::from_slice": "2.53ms", - "air_parser::parser::air_parser::parse": "63.00µs" + "air::preparation_step::preparation::make_exec_ctx": "63.00µs", + "air_parser::parser::air_parser::parse": "30.28ms" } }, - "runner::execute": "25.00µs" + "runner::execute": { + "common_prefix": "air::execution_step::instructions::call", + "duration": "270.00µs", + "nested": { + "execute": { + "common_prefix": "air::execution_step::instructions::call::resolved_call", + "duration": "167.00µs", + "nested": { + "execute": "29.00µs", + "new": "38.00µs" + } + } + } + } } } }, - "total_time": "4.47ms" + "total_time": "33.06ms" + } + }, + "datetime": "2023-02-13 13:19:34.106863+00:00", + "platform": "macOS-12.0.1-x86_64-i386-64bit", + "version": "0.35.1" + }, + "d77ebe8481884bc3b2778c8083f1bf459e548e929edd87041beb14f6b868d35f": { + "benches": { + "big_values_data": { + "comment": "Loading a trace with huge values", + "memory_sizes": [ + "58.938 MiB", + "58.938 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "8.59ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "4.79ms", + "nested": { + "from_slice": "4.74ms" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "170.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "14.00µs", + "air_parser::parser::air_parser::parse": "33.00µs" + } + }, + "runner::execute": "13.00µs", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "3.25ms", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "3.23ms", + "nested": { + "populate_outcome_from_contexts": "3.19ms" + } + } + } + }, + "signing_step::sign_produced_cids": "100.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "85.00µs", + "nested": { + "verify": "13.00µs" + } + } + } + } + }, + "total_time": "8.59ms" }, - "network_explore": { - "comment": "5 peers of network are discovered", + "canon-map-key-by-lens": { + "comment": "benchmarking a map insert operation", + "memory_sizes": [ + "56.625 MiB", + "56.625 MiB" + ], "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "9.70ms", + "duration": "11.57ms", "nested": { - "farewell_step::outcome::from_success_result": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "3.11ms", + "nested": { + "from_slice": "3.06ms" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "382.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "185.00µs", + "air_parser::parser::air_parser::parse": "74.00µs" + } + }, + "runner::execute": "1.92ms", + "runner::farewell": { "common_prefix": "air::farewell_step::outcome", - "duration": "291.00µs", + "duration": "1.83ms", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "1.81ms", + "nested": { + "populate_outcome_from_contexts": "1.46ms" + } + } + } + }, + "signing_step::sign_produced_cids": "95.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "4.07ms", + "nested": { + "verify": "3.72ms" + } + } + } + } + }, + "total_time": "11.57ms" + }, + "canon-map-key-element-by-lens": { + "comment": "benchmarking a map insert operation", + "memory_sizes": [ + "56.625 MiB", + "56.625 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "11.55ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "3.10ms", + "nested": { + "from_slice": "3.06ms" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "379.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "184.00µs", + "air_parser::parser::air_parser::parse": "74.00µs" + } + }, + "runner::execute": "1.90ms", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "1.81ms", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "1.79ms", + "nested": { + "populate_outcome_from_contexts": "1.46ms" + } + } + } + }, + "signing_step::sign_produced_cids": "95.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "4.08ms", + "nested": { + "verify": "3.73ms" + } + } + } + } + }, + "total_time": "11.55ms" + }, + "canon-map-multiple-keys": { + "comment": "benchmarking a map insert operation", + "memory_sizes": [ + "54.500 MiB", + "54.500 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "9.83ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "397.00µs", + "nested": { + "from_slice": "352.00µs" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "196.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "15.00µs", + "air_parser::parser::air_parser::parse": "58.00µs" + } + }, + "runner::execute": "6.93ms", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "1.62ms", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "1.60ms", + "nested": { + "populate_outcome_from_contexts": "1.31ms" + } + } + } + }, + "signing_step::sign_produced_cids": "96.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "405.00µs", + "nested": { + "verify": "50.00µs" + } + } + } + } + }, + "total_time": "9.83ms" + }, + "canon-map-scalar-multiple-keys": { + "comment": "benchmarking a map insert operation", + "memory_sizes": [ + "53.125 MiB", + "53.125 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "4.05ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "400.00µs", "nested": { - "populate_outcome_from_contexts": { - "common_prefix": "air::farewell_step::outcome::serde_json", - "duration": "230.00µs", - "nested": { - "to_vec(call_results)": "26.00µs", - "to_vec(data)": "79.00µs" - } - } + "from_slice": "354.00µs" } }, "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "847.00µs", + "duration": "200.00µs", "nested": { - "air::preparation_step::preparation::make_exec_ctx": "64.00µs", - "air_interpreter_data::interpreter_data::serde_json::from_slice": "315.00µs", - "air_parser::parser::air_parser::parse": "206.00µs" + "air::preparation_step::preparation::make_exec_ctx": "15.00µs", + "air_parser::parser::air_parser::parse": "60.00µs" } }, - "runner::execute": { - "common_prefix": "air::execution_step::instructions::call", - "duration": "8.29ms", + "runner::execute": "2.42ms", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "350.00µs", "nested": { - "execute": { - "common_prefix": "air::execution_step::instructions::call::resolved_call", - "duration": "7.28ms", + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "331.00µs", "nested": { - "execute": { - "common_prefix": "air::execution_step::resolver::resolve", - "duration": "1.28ms", - "nested": { - "resolve_ast_variable": { - "common_prefix": "air::execution_step::resolver::resolve", - "duration": "497.00µs", - "nested": { - "resolve_variable": "155.00µs" - } - } - } - }, - "new": { - "common_prefix": "air::execution_step::resolver::resolve", - "duration": "4.24ms", - "nested": { - "resolve_ast_scalar": { - "common_prefix": "air::execution_step::resolver::resolve", - "duration": "2.99ms", - "nested": { - "resolve_ast_variable": { - "common_prefix": "air::execution_step::resolver::resolve", - "duration": "1.81ms", - "nested": { - "resolve_variable": "569.00µs" - } - } - } - } - } - } + "populate_outcome_from_contexts": "294.00µs" } } } + }, + "signing_step::sign_produced_cids": "95.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "404.00µs", + "nested": { + "verify": "50.00µs" + } } } } }, - "total_time": "9.70ms" + "total_time": "4.05ms" }, - "parser_10000_100": { - "comment": "Running very long AIR script with lot of variables and assignments", + "canon-map-scalar-single-key": { + "comment": "benchmarking a map insert operation", + "memory_sizes": [ + "53.000 MiB", + "53.000 MiB" + ], "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "33.06ms", + "duration": "3.27ms", "nested": { - "farewell_step::outcome::from_success_result": { - "common_prefix": "air::farewell_step::outcome", - "duration": "207.00µs", + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "412.00µs", "nested": { - "populate_outcome_from_contexts": { - "common_prefix": "air::farewell_step::outcome::serde_json", - "duration": "158.00µs", - "nested": { - "to_vec(call_results)": "18.00µs", - "to_vec(data)": "47.00µs" - } - } + "from_slice": "364.00µs" } }, "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "30.52ms", + "duration": "193.00µs", "nested": { - "air::preparation_step::preparation::make_exec_ctx": "63.00µs", - "air_parser::parser::air_parser::parse": "30.28ms" + "air::preparation_step::preparation::make_exec_ctx": "15.00µs", + "air_parser::parser::air_parser::parse": "55.00µs" } }, - "runner::execute": { - "common_prefix": "air::execution_step::instructions::call", - "duration": "270.00µs", + "runner::execute": "1.58ms", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "356.00µs", "nested": { - "execute": { - "common_prefix": "air::execution_step::instructions::call::resolved_call", - "duration": "167.00µs", + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "336.00µs", "nested": { - "execute": "29.00µs", - "new": "38.00µs" + "populate_outcome_from_contexts": "283.00µs" } } } + }, + "signing_step::sign_produced_cids": "95.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "447.00µs", + "nested": { + "verify": "92.00µs" + } } } } }, - "total_time": "33.06ms" - } - }, - "datetime": "2023-02-13 13:19:34.106863+00:00", - "platform": "macOS-12.0.1-x86_64-i386-64bit", - "version": "0.35.1" - }, - "d77ebe8481884bc3b2778c8083f1bf459e548e929edd87041beb14f6b868d35f": { - "benches": { - "big_values_data": { - "comment": "Loading a trace with huge values", + "total_time": "3.27ms" + }, + "canon-map-single-key": { + "comment": "benchmarking a map insert operation", "memory_sizes": [ - "58.938 MiB", - "58.938 MiB" + "55.312 MiB", + "55.312 MiB" ], "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "8.70ms", + "duration": "8.25ms", "nested": { "preparation_step::preparation::parse_data": { "common_prefix": "air_interpreter_data::interpreter_data::serde_json", - "duration": "4.88ms", + "duration": "414.00µs", "nested": { - "from_slice": "4.83ms" + "from_slice": "366.00µs" } }, "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "170.00µs", + "duration": "193.00µs", "nested": { - "air::preparation_step::preparation::make_exec_ctx": "18.00µs", - "air_parser::parser::air_parser::parse": "28.00µs" + "air::preparation_step::preparation::make_exec_ctx": "15.00µs", + "air_parser::parser::air_parser::parse": "56.00µs" } }, - "runner::execute": "12.00µs", + "runner::execute": "5.19ms", "runner::farewell": { "common_prefix": "air::farewell_step::outcome", - "duration": "3.30ms", + "duration": "1.71ms", "nested": { "from_success_result": { "common_prefix": "air::farewell_step::outcome", - "duration": "3.28ms", + "duration": "1.69ms", "nested": { - "populate_outcome_from_contexts": "3.24ms" + "populate_outcome_from_contexts": "1.45ms" } } } }, - "signing_step::sign_produced_cids": "102.00µs", + "signing_step::sign_produced_cids": "96.00µs", "verification_step::verify": { "common_prefix": "air_interpreter_data::cid_info", - "duration": "79.00µs", + "duration": "449.00µs", "nested": { - "verify": "10.00µs" + "verify": "95.00µs" } } } } }, - "total_time": "8.70ms" + "total_time": "8.25ms" }, "dashboard": { "comment": "big dashboard test", @@ -1558,55 +2750,55 @@ "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "6.55ms", + "duration": "6.74ms", "nested": { "preparation_step::preparation::parse_data": { "common_prefix": "air_interpreter_data::interpreter_data::serde_json", "duration": "1.00ms", "nested": { - "from_slice": "946.00µs" + "from_slice": "947.00µs" } }, "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "314.00µs", + "duration": "318.00µs", "nested": { - "air::preparation_step::preparation::make_exec_ctx": "34.00µs", - "air_parser::parser::air_parser::parse": "160.00µs" + "air::preparation_step::preparation::make_exec_ctx": "32.00µs", + "air_parser::parser::air_parser::parse": "163.00µs" } }, "runner::execute": { "common_prefix": "air::execution_step::instructions::call::resolved_call::serde_json", - "duration": "1.63ms", + "duration": "1.70ms", "nested": { - "to_string(tetraplets)": "350.00µs" + "to_string(tetraplets)": "362.00µs" } }, "runner::farewell": { "common_prefix": "air::farewell_step::outcome", - "duration": "460.00µs", + "duration": "462.00µs", "nested": { "from_success_result": { "common_prefix": "air::farewell_step::outcome", - "duration": "440.00µs", + "duration": "442.00µs", "nested": { - "populate_outcome_from_contexts": "393.00µs" + "populate_outcome_from_contexts": "399.00µs" } } } }, - "signing_step::sign_produced_cids": "102.00µs", + "signing_step::sign_produced_cids": "100.00µs", "verification_step::verify": { "common_prefix": "air_interpreter_data::cid_info", - "duration": "2.88ms", + "duration": "2.97ms", "nested": { - "verify": "161.00µs" + "verify": "215.00µs" } } } } }, - "total_time": "6.55ms" + "total_time": "6.74ms" }, "long_data": { "comment": "Long data trace", @@ -1621,29 +2813,29 @@ "nested": { "preparation_step::preparation::parse_data": { "common_prefix": "air_interpreter_data::interpreter_data::serde_json", - "duration": "1.75ms", + "duration": "1.77ms", "nested": { - "from_slice": "1.71ms" + "from_slice": "1.72ms" } }, "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "166.00µs", + "duration": "172.00µs", "nested": { - "air::preparation_step::preparation::make_exec_ctx": "17.00µs", - "air_parser::parser::air_parser::parse": "26.00µs" + "air::preparation_step::preparation::make_exec_ctx": "14.00µs", + "air_parser::parser::air_parser::parse": "30.00µs" } }, "runner::execute": "12.00µs", "runner::farewell": { "common_prefix": "air::farewell_step::outcome", - "duration": "929.00µs", + "duration": "926.00µs", "nested": { "from_success_result": { "common_prefix": "air::farewell_step::outcome", - "duration": "910.00µs", + "duration": "906.00µs", "nested": { - "populate_outcome_from_contexts": "871.00µs" + "populate_outcome_from_contexts": "867.00µs" } } } @@ -1651,7 +2843,7 @@ "signing_step::sign_produced_cids": "102.00µs", "verification_step::verify": { "common_prefix": "air_interpreter_data::cid_info", - "duration": "522.00µs", + "duration": "529.00µs", "nested": { "verify": "10.00µs" } @@ -1670,55 +2862,55 @@ "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "2.65ms", + "duration": "2.63ms", "nested": { "preparation_step::preparation::parse_data": { "common_prefix": "air_interpreter_data::interpreter_data::serde_json", - "duration": "427.00µs", + "duration": "417.00µs", "nested": { - "from_slice": "369.00µs" + "from_slice": "363.00µs" } }, "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "208.00µs", + "duration": "205.00µs", "nested": { - "air::preparation_step::preparation::make_exec_ctx": "25.00µs", + "air::preparation_step::preparation::make_exec_ctx": "26.00µs", "air_parser::parser::air_parser::parse": "58.00µs" } }, "runner::execute": { "common_prefix": "air::execution_step::instructions::call::resolved_call::serde_json", - "duration": "448.00µs", + "duration": "446.00µs", "nested": { "to_string(tetraplets)": "10.00µs" } }, "runner::farewell": { "common_prefix": "air::farewell_step::outcome", - "duration": "322.00µs", + "duration": "321.00µs", "nested": { "from_success_result": { "common_prefix": "air::farewell_step::outcome", - "duration": "301.00µs", + "duration": "300.00µs", "nested": { - "populate_outcome_from_contexts": "254.00µs" + "populate_outcome_from_contexts": "252.00µs" } } } }, - "signing_step::sign_produced_cids": "98.00µs", + "signing_step::sign_produced_cids": "100.00µs", "verification_step::verify": { "common_prefix": "air_interpreter_data::cid_info", - "duration": "957.00µs", + "duration": "952.00µs", "nested": { - "verify": "238.00µs" + "verify": "240.00µs" } } } } }, - "total_time": "2.65ms" + "total_time": "2.63ms" }, "multiple-cids50": { "comment": "verifying multiple CIDs for single peer", @@ -1991,7 +3183,7 @@ "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "9.48ms", + "duration": "9.96ms", "nested": { "preparation_step::preparation::parse_data": { "common_prefix": "air_interpreter_data::interpreter_data::serde_json", @@ -2004,42 +3196,42 @@ "common_prefix": "", "duration": "254.00µs", "nested": { - "air::preparation_step::preparation::make_exec_ctx": "72.00µs", - "air_parser::parser::air_parser::parse": "62.00µs" + "air::preparation_step::preparation::make_exec_ctx": "70.00µs", + "air_parser::parser::air_parser::parse": "63.00µs" } }, "runner::execute": { "common_prefix": "air::execution_step::instructions::call::resolved_call::serde_json", - "duration": "2.72ms", + "duration": "2.87ms", "nested": { "to_string(tetraplets)": "10.00µs" } }, "runner::farewell": { "common_prefix": "air::farewell_step::outcome", - "duration": "915.00µs", + "duration": "901.00µs", "nested": { "from_success_result": { "common_prefix": "air::farewell_step::outcome", - "duration": "896.00µs", + "duration": "881.00µs", "nested": { - "populate_outcome_from_contexts": "788.00µs" + "populate_outcome_from_contexts": "783.00µs" } } } }, - "signing_step::sign_produced_cids": "102.00µs", + "signing_step::sign_produced_cids": "99.00µs", "verification_step::verify": { "common_prefix": "air_interpreter_data::cid_info", "duration": "3.97ms", "nested": { - "verify": "762.00µs" + "verify": "1.02ms" } } } } }, - "total_time": "9.48ms" + "total_time": "9.96ms" }, "multiple-sigs10": { "comment": "signing multiple CIDs", @@ -2177,27 +3369,27 @@ "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "17.29ms", + "duration": "18.99ms", "nested": { "preparation_step::preparation::parse_data": { "common_prefix": "air_interpreter_data::interpreter_data::serde_json", - "duration": "3.90ms", + "duration": "3.94ms", "nested": { - "from_slice": "3.85ms" + "from_slice": "3.88ms" } }, "preparation_step::preparation::prepare": { "common_prefix": "", "duration": "332.00µs", "nested": { - "air::preparation_step::preparation::make_exec_ctx": "152.00µs", - "air_parser::parser::air_parser::parse": "61.00µs" + "air::preparation_step::preparation::make_exec_ctx": "147.00µs", + "air_parser::parser::air_parser::parse": "62.00µs" } }, - "runner::execute": "6.87ms", + "runner::execute": "8.10ms", "runner::farewell": { "common_prefix": "air::farewell_step::outcome", - "duration": "2.57ms", + "duration": "2.55ms", "nested": { "from_success_result": { "common_prefix": "air::farewell_step::outcome", @@ -2219,7 +3411,7 @@ } } }, - "total_time": "17.29ms" + "total_time": "18.99ms" }, "multiple-sigs50": { "comment": "signing multiple CIDs", @@ -2283,55 +3475,55 @@ "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "3.06ms", + "duration": "3.13ms", "nested": { "preparation_step::preparation::parse_data": { "common_prefix": "air_interpreter_data::interpreter_data::serde_json", - "duration": "484.00µs", + "duration": "482.00µs", "nested": { - "from_slice": "428.00µs" + "from_slice": "427.00µs" } }, "preparation_step::preparation::prepare": { "common_prefix": "", "duration": "220.00µs", "nested": { - "air::preparation_step::preparation::make_exec_ctx": "22.00µs", - "air_parser::parser::air_parser::parse": "76.00µs" + "air::preparation_step::preparation::make_exec_ctx": "19.00µs", + "air_parser::parser::air_parser::parse": "75.00µs" } }, "runner::execute": { "common_prefix": "air::execution_step::instructions::call::resolved_call::serde_json", - "duration": "162.00µs", + "duration": "167.00µs", "nested": { "to_string(tetraplets)": "13.00µs" } }, "runner::farewell": { "common_prefix": "air::farewell_step::outcome", - "duration": "256.00µs", + "duration": "252.00µs", "nested": { "from_success_result": { "common_prefix": "air::farewell_step::outcome", - "duration": "236.00µs", + "duration": "232.00µs", "nested": { - "populate_outcome_from_contexts": "194.00µs" + "populate_outcome_from_contexts": "195.00µs" } } } }, - "signing_step::sign_produced_cids": "101.00µs", + "signing_step::sign_produced_cids": "100.00µs", "verification_step::verify": { "common_prefix": "air_interpreter_data::cid_info", - "duration": "1.69ms", + "duration": "1.72ms", "nested": { - "verify": "67.00µs" + "verify": "80.00µs" } } } } }, - "total_time": "3.06ms" + "total_time": "3.13ms" }, "network_explore": { "comment": "5 peers of network are discovered", @@ -2427,15 +3619,15 @@ "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "725.00µs", + "duration": "749.00µs", "nested": { "preparation_step::preparation::parse_data": "29.00µs", "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "179.00µs", + "duration": "183.00µs", "nested": { - "air::preparation_step::preparation::make_exec_ctx": "19.00µs", - "air_parser::parser::air_parser::parse": "33.00µs" + "air::preparation_step::preparation::make_exec_ctx": "14.00µs", + "air_parser::parser::air_parser::parse": "31.00µs" } }, "runner::execute": "11.00µs", @@ -2455,7 +3647,7 @@ "signing_step::sign_produced_cids": "109.00µs", "verification_step::verify": { "common_prefix": "air_interpreter_data::cid_info", - "duration": "45.00µs", + "duration": "39.00µs", "nested": { "verify": "12.00µs" } @@ -2463,7 +3655,7 @@ } } }, - "total_time": "725.00µs" + "total_time": "749.00µs" }, "parser_10000_100": { "comment": "Running very long AIR script with lot of variables and assignments", @@ -2474,32 +3666,32 @@ "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "23.33ms", + "duration": "23.60ms", "nested": { - "preparation_step::preparation::parse_data": "28.00µs", + "preparation_step::preparation::parse_data": "22.00µs", "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "21.73ms", + "duration": "21.93ms", "nested": { - "air::preparation_step::preparation::make_exec_ctx": "18.00µs", - "air_parser::parser::air_parser::parse": "21.55ms" + "air::preparation_step::preparation::make_exec_ctx": "14.00µs", + "air_parser::parser::air_parser::parse": "21.79ms" } }, - "runner::execute": "54.00µs", + "runner::execute": "56.00µs", "runner::farewell": { "common_prefix": "air::farewell_step::outcome", - "duration": "179.00µs", + "duration": "178.00µs", "nested": { "from_success_result": { "common_prefix": "air::farewell_step::outcome", - "duration": "160.00µs", + "duration": "158.00µs", "nested": { - "populate_outcome_from_contexts": "122.00µs" + "populate_outcome_from_contexts": "126.00µs" } } } }, - "signing_step::sign_produced_cids": "113.00µs", + "signing_step::sign_produced_cids": "104.00µs", "verification_step::verify": { "common_prefix": "air_interpreter_data::cid_info", "duration": "44.00µs", @@ -2510,10 +3702,116 @@ } } }, - "total_time": "23.33ms" + "total_time": "23.60ms" + }, + "populate-map-multiple-keys": { + "comment": "benchmarking a map insert operation", + "memory_sizes": [ + "53.000 MiB", + "53.000 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "3.42ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "151.00µs", + "nested": { + "from_slice": "107.00µs" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "197.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "15.00µs", + "air_parser::parser::air_parser::parse": "60.00µs" + } + }, + "runner::execute": "2.12ms", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "289.00µs", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "269.00µs", + "nested": { + "populate_outcome_from_contexts": "233.00µs" + } + } + } + }, + "signing_step::sign_produced_cids": "96.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "392.00µs", + "nested": { + "verify": "48.00µs" + } + } + } + } + }, + "total_time": "3.42ms" + }, + "populate-map-single-key": { + "comment": "benchmarking a map insert operation", + "memory_sizes": [ + "52.938 MiB", + "52.938 MiB" + ], + "stats": { + "air::runner::execute_air": { + "common_prefix": "air", + "duration": "2.71ms", + "nested": { + "preparation_step::preparation::parse_data": { + "common_prefix": "air_interpreter_data::interpreter_data::serde_json", + "duration": "207.00µs", + "nested": { + "from_slice": "163.00µs" + } + }, + "preparation_step::preparation::prepare": { + "common_prefix": "", + "duration": "194.00µs", + "nested": { + "air::preparation_step::preparation::make_exec_ctx": "15.00µs", + "air_parser::parser::air_parser::parse": "58.00µs" + } + }, + "runner::execute": "1.29ms", + "runner::farewell": { + "common_prefix": "air::farewell_step::outcome", + "duration": "311.00µs", + "nested": { + "from_success_result": { + "common_prefix": "air::farewell_step::outcome", + "duration": "290.00µs", + "nested": { + "populate_outcome_from_contexts": "236.00µs" + } + } + } + }, + "signing_step::sign_produced_cids": "95.00µs", + "verification_step::verify": { + "common_prefix": "air_interpreter_data::cid_info", + "duration": "435.00µs", + "nested": { + "verify": "93.00µs" + } + } + } + } + }, + "total_time": "2.71ms" } }, - "datetime": "2023-10-20 13:46:12.008371+00:00", + "datetime": "2023-11-06 18:49:22.923773+00:00", "features": "check_signatures,gen_signatures", "platform": "macOS-14.0-arm64-arm-64bit", "version": "0.53.0" @@ -2529,18 +3827,18 @@ "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "11.90ms", + "duration": "12.11ms", "nested": { "preparation_step::preparation::parse_data": { "common_prefix": "air_interpreter_data::interpreter_data::serde_json", - "duration": "6.61ms", + "duration": "6.80ms", "nested": { - "from_slice": "6.55ms" + "from_slice": "6.74ms" } }, "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "221.00µs", + "duration": "226.00µs", "nested": { "air::preparation_step::preparation::make_exec_ctx": "18.00µs", "air_parser::parser::air_parser::parse": "19.00µs" @@ -2549,13 +3847,13 @@ "runner::execute": "10.00µs", "runner::farewell": { "common_prefix": "air::farewell_step::outcome", - "duration": "4.68ms", + "duration": "4.70ms", "nested": { "from_success_result": { "common_prefix": "air::farewell_step::outcome", - "duration": "4.66ms", + "duration": "4.68ms", "nested": { - "populate_outcome_from_contexts": "4.60ms" + "populate_outcome_from_contexts": "4.62ms" } } } @@ -2571,7 +3869,7 @@ } } }, - "total_time": "11.90ms" + "total_time": "12.11ms" }, "dashboard": { "comment": "big dashboard test", @@ -2582,39 +3880,39 @@ "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "9.39ms", + "duration": "9.52ms", "nested": { "preparation_step::preparation::parse_data": { "common_prefix": "air_interpreter_data::interpreter_data::serde_json", - "duration": "1.28ms", + "duration": "1.26ms", "nested": { - "from_slice": "1.22ms" + "from_slice": "1.21ms" } }, "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "351.00µs", + "duration": "354.00µs", "nested": { - "air::preparation_step::preparation::make_exec_ctx": "41.00µs", - "air_parser::parser::air_parser::parse": "132.00µs" + "air::preparation_step::preparation::make_exec_ctx": "42.00µs", + "air_parser::parser::air_parser::parse": "135.00µs" } }, "runner::execute": { "common_prefix": "air::execution_step::instructions::call::resolved_call::serde_json", - "duration": "2.22ms", + "duration": "2.27ms", "nested": { - "to_string(tetraplets)": "448.00µs" + "to_string(tetraplets)": "449.00µs" } }, "runner::farewell": { "common_prefix": "air::farewell_step::outcome", - "duration": "679.00µs", + "duration": "672.00µs", "nested": { "from_success_result": { "common_prefix": "air::farewell_step::outcome", - "duration": "657.00µs", + "duration": "651.00µs", "nested": { - "populate_outcome_from_contexts": "606.00µs" + "populate_outcome_from_contexts": "601.00µs" } } } @@ -2624,13 +3922,13 @@ "common_prefix": "air_interpreter_data::cid_info", "duration": "4.57ms", "nested": { - "verify": "209.00µs" + "verify": "267.00µs" } } } } }, - "total_time": "9.39ms" + "total_time": "9.52ms" }, "long_data": { "comment": "Long data trace", @@ -2641,13 +3939,13 @@ "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "4.62ms", + "duration": "4.57ms", "nested": { "preparation_step::preparation::parse_data": { "common_prefix": "air_interpreter_data::interpreter_data::serde_json", - "duration": "2.28ms", + "duration": "2.27ms", "nested": { - "from_slice": "2.24ms" + "from_slice": "2.23ms" } }, "preparation_step::preparation::prepare": { @@ -2655,27 +3953,27 @@ "duration": "216.00µs", "nested": { "air::preparation_step::preparation::make_exec_ctx": "16.00µs", - "air_parser::parser::air_parser::parse": "19.00µs" + "air_parser::parser::air_parser::parse": "18.00µs" } }, "runner::execute": "9.00µs", "runner::farewell": { "common_prefix": "air::farewell_step::outcome", - "duration": "1.14ms", + "duration": "1.13ms", "nested": { "from_success_result": { "common_prefix": "air::farewell_step::outcome", - "duration": "1.11ms", + "duration": "1.14ms", "nested": { - "populate_outcome_from_contexts": "1.07ms" + "populate_outcome_from_contexts": "1.10ms" } } } }, - "signing_step::sign_produced_cids": "158.00µs", + "signing_step::sign_produced_cids": "157.00µs", "verification_step::verify": { "common_prefix": "air_interpreter_data::cid_info", - "duration": "686.00µs", + "duration": "662.00µs", "nested": { "verify": "11.00µs" } @@ -2683,7 +3981,7 @@ } } }, - "total_time": "4.62ms" + "total_time": "4.57ms" }, "multiple-cids10": { "comment": "verifying multiple CIDs for single peer", @@ -2694,55 +3992,55 @@ "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "3.42ms", + "duration": "3.53ms", "nested": { "preparation_step::preparation::parse_data": { "common_prefix": "air_interpreter_data::interpreter_data::serde_json", - "duration": "450.00µs", + "duration": "467.00µs", "nested": { - "from_slice": "400.00µs" + "from_slice": "413.00µs" } }, "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "253.00µs", + "duration": "263.00µs", "nested": { - "air::preparation_step::preparation::make_exec_ctx": "32.00µs", - "air_parser::parser::air_parser::parse": "43.00µs" + "air::preparation_step::preparation::make_exec_ctx": "34.00µs", + "air_parser::parser::air_parser::parse": "47.00µs" } }, "runner::execute": { "common_prefix": "air::execution_step::instructions::call::resolved_call::serde_json", - "duration": "580.00µs", + "duration": "593.00µs", "nested": { - "to_string(tetraplets)": "13.00µs" + "to_string(tetraplets)": "14.00µs" } }, "runner::farewell": { "common_prefix": "air::farewell_step::outcome", - "duration": "455.00µs", + "duration": "470.00µs", "nested": { "from_success_result": { "common_prefix": "air::farewell_step::outcome", - "duration": "434.00µs", + "duration": "448.00µs", "nested": { - "populate_outcome_from_contexts": "380.00µs" + "populate_outcome_from_contexts": "392.00µs" } } } }, - "signing_step::sign_produced_cids": "158.00µs", + "signing_step::sign_produced_cids": "161.00µs", "verification_step::verify": { "common_prefix": "air_interpreter_data::cid_info", - "duration": "1.41ms", + "duration": "1.45ms", "nested": { - "verify": "303.00µs" + "verify": "317.00µs" } } } } }, - "total_time": "3.42ms" + "total_time": "3.53ms" }, "multiple-cids50": { "comment": "verifying multiple CIDs for single peer", @@ -3008,21 +4306,21 @@ "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "13.55ms", + "duration": "14.36ms", "nested": { "preparation_step::preparation::parse_data": { "common_prefix": "air_interpreter_data::interpreter_data::serde_json", - "duration": "1.72ms", + "duration": "1.74ms", "nested": { - "from_slice": "1.66ms" + "from_slice": "1.68ms" } }, "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "332.00µs", + "duration": "333.00µs", "nested": { "air::preparation_step::preparation::make_exec_ctx": "102.00µs", - "air_parser::parser::air_parser::parse": "51.00µs" + "air_parser::parser::air_parser::parse": "50.00µs" } }, "runner::execute": { @@ -3034,29 +4332,29 @@ }, "runner::farewell": { "common_prefix": "air::farewell_step::outcome", - "duration": "1.31ms", + "duration": "1.30ms", "nested": { "from_success_result": { "common_prefix": "air::farewell_step::outcome", - "duration": "1.28ms", + "duration": "1.31ms", "nested": { - "populate_outcome_from_contexts": "1.17ms" + "populate_outcome_from_contexts": "1.16ms" } } } }, - "signing_step::sign_produced_cids": "158.00µs", + "signing_step::sign_produced_cids": "161.00µs", "verification_step::verify": { "common_prefix": "air_interpreter_data::cid_info", - "duration": "6.26ms", + "duration": "6.74ms", "nested": { - "verify": "1.11ms" + "verify": "1.45ms" } } } } }, - "total_time": "13.55ms" + "total_time": "14.36ms" }, "multiple-sigs200": { "comment": "signing multiple CIDs", @@ -3141,49 +4439,49 @@ "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "24.47ms", + "duration": "26.89ms", "nested": { "preparation_step::preparation::parse_data": { "common_prefix": "air_interpreter_data::interpreter_data::serde_json", - "duration": "4.91ms", + "duration": "5.04ms", "nested": { - "from_slice": "4.85ms" + "from_slice": "4.99ms" } }, "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "441.00µs", + "duration": "454.00µs", "nested": { - "air::preparation_step::preparation::make_exec_ctx": "215.00µs", - "air_parser::parser::air_parser::parse": "49.00µs" + "air::preparation_step::preparation::make_exec_ctx": "219.00µs", + "air_parser::parser::air_parser::parse": "50.00µs" } }, - "runner::execute": "10.13ms", + "runner::execute": "11.80ms", "runner::farewell": { "common_prefix": "air::farewell_step::outcome", - "duration": "3.75ms", + "duration": "3.74ms", "nested": { "from_success_result": { "common_prefix": "air::farewell_step::outcome", - "duration": "3.73ms", + "duration": "3.71ms", "nested": { - "populate_outcome_from_contexts": "3.55ms" + "populate_outcome_from_contexts": "3.54ms" } } } }, - "signing_step::sign_produced_cids": "674.00µs", + "signing_step::sign_produced_cids": "678.00µs", "verification_step::verify": { "common_prefix": "air_interpreter_data::cid_info", - "duration": "4.45ms", + "duration": "5.03ms", "nested": { - "verify": "1.94ms" + "verify": "2.50ms" } } } } }, - "total_time": "24.47ms" + "total_time": "26.89ms" }, "multiple-sigs50": { "comment": "signing multiple CIDs", @@ -3268,55 +4566,55 @@ "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "4.36ms", + "duration": "4.43ms", "nested": { "preparation_step::preparation::parse_data": { "common_prefix": "air_interpreter_data::interpreter_data::serde_json", - "duration": "575.00µs", + "duration": "572.00µs", "nested": { - "from_slice": "520.00µs" + "from_slice": "519.00µs" } }, "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "264.00µs", + "duration": "268.00µs", "nested": { "air::preparation_step::preparation::make_exec_ctx": "23.00µs", - "air_parser::parser::air_parser::parse": "66.00µs" + "air_parser::parser::air_parser::parse": "67.00µs" } }, "runner::execute": { "common_prefix": "air::execution_step::instructions::call::resolved_call::serde_json", - "duration": "188.00µs", + "duration": "190.00µs", "nested": { - "to_string(tetraplets)": "17.00µs" + "to_string(tetraplets)": "13.00µs" } }, "runner::farewell": { "common_prefix": "air::farewell_step::outcome", - "duration": "361.00µs", + "duration": "366.00µs", "nested": { "from_success_result": { "common_prefix": "air::farewell_step::outcome", - "duration": "340.00µs", + "duration": "344.00µs", "nested": { - "populate_outcome_from_contexts": "298.00µs" + "populate_outcome_from_contexts": "301.00µs" } } } }, - "signing_step::sign_produced_cids": "160.00µs", + "signing_step::sign_produced_cids": "162.00µs", "verification_step::verify": { "common_prefix": "air_interpreter_data::cid_info", - "duration": "2.68ms", + "duration": "2.75ms", "nested": { - "verify": "65.00µs" + "verify": "79.00µs" } } } } }, - "total_time": "4.36ms" + "total_time": "4.43ms" }, "null": { "comment": "Empty data and null script", @@ -3327,35 +4625,35 @@ "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "828.00µs", + "duration": "848.00µs", "nested": { "preparation_step::preparation::parse_data": "18.00µs", "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "219.00µs", + "duration": "224.00µs", "nested": { "air::preparation_step::preparation::make_exec_ctx": "16.00µs", "air_parser::parser::air_parser::parse": "19.00µs" } }, - "runner::execute": "10.00µs", + "runner::execute": "9.00µs", "runner::farewell": { "common_prefix": "air::farewell_step::outcome", - "duration": "249.00µs", + "duration": "257.00µs", "nested": { "from_success_result": { "common_prefix": "air::farewell_step::outcome", - "duration": "227.00µs", + "duration": "234.00µs", "nested": { - "populate_outcome_from_contexts": "188.00µs" + "populate_outcome_from_contexts": "194.00µs" } } } }, - "signing_step::sign_produced_cids": "157.00µs", + "signing_step::sign_produced_cids": "162.00µs", "verification_step::verify": { "common_prefix": "air_interpreter_data::cid_info", - "duration": "38.00µs", + "duration": "39.00µs", "nested": { "verify": "12.00µs" } @@ -3363,7 +4661,7 @@ } } }, - "total_time": "828.00µs" + "total_time": "848.00µs" }, "parser_10000_100": { "comment": "Running very long AIR script with lot of variables and assignments", @@ -3374,18 +4672,18 @@ "stats": { "air::runner::execute_air": { "common_prefix": "air", - "duration": "29.93ms", + "duration": "30.20ms", "nested": { - "preparation_step::preparation::parse_data": "20.00µs", + "preparation_step::preparation::parse_data": "16.00µs", "preparation_step::preparation::prepare": { "common_prefix": "", - "duration": "28.24ms", + "duration": "28.48ms", "nested": { - "air::preparation_step::preparation::make_exec_ctx": "18.00µs", - "air_parser::parser::air_parser::parse": "27.98ms" + "air::preparation_step::preparation::make_exec_ctx": "17.00µs", + "air_parser::parser::air_parser::parse": "28.28ms" } }, - "runner::execute": "30.00µs", + "runner::execute": "31.00µs", "runner::farewell": { "common_prefix": "air::farewell_step::outcome", "duration": "258.00µs", @@ -3394,7 +4692,7 @@ "common_prefix": "air::farewell_step::outcome", "duration": "236.00µs", "nested": { - "populate_outcome_from_contexts": "196.00µs" + "populate_outcome_from_contexts": "194.00µs" } } } @@ -3410,10 +4708,10 @@ } } }, - "total_time": "29.93ms" + "total_time": "30.20ms" } }, - "datetime": "2023-10-20 13:56:40.619386+00:00", + "datetime": "2023-10-20 12:46:01.094988+00:00", "features": "check_signatures,gen_signatures", "platform": "Linux-5.15.0-76-generic-x86_64-with-glibc2.29", "version": "0.53.0" diff --git a/benches/PERFORMANCE.txt b/benches/PERFORMANCE.txt index 63fc0aafc9..35b4158ff8 100644 --- a/benches/PERFORMANCE.txt +++ b/benches/PERFORMANCE.txt @@ -326,6 +326,239 @@ Machine 62dabcde478dc58760ebbe71ef6047299144a5f63990c6c3d826ebf30175adfc: execute: 197.00µs execute: 42.00µs new: 42.00µs +Machine 88756ca30bfb93b0da6a64252adc98fc3e97e142c3b4970af3d2948fd66107b4: + Platform: Linux-6.5.9-arch2-1-x86_64-with-glibc2.35 + Timestamp: 2023-11-08 08:53:43.189029+00:00 + AquaVM version: 0.54.0 + Benches: + Features: + big-values-data (19.60ms; 58.938 MiB, 58.938 MiB): Loading a trace with huge values + air::runner::execute_air: 19.60ms + preparation_step::preparation::parse_data: 6.99ms + from_slice: 6.92ms + preparation_step::preparation::prepare: 259.00µs + air::preparation_step::preparation::make_exec_ctx: 23.00µs + air_parser::parser::air_parser::parse: 21.00µs + runner::execute: 11.00µs + runner::farewell: 5.59ms + from_success_result: 5.55ms + populate_outcome_from_contexts: 5.49ms + signing_step::sign_produced_cids: 186.00µs + verification_step::verify: 6.38ms + verify: 5.75ms + canon-map-key-by-lens (16.20ms; 56.625 MiB, 56.625 MiB): benchmarking a map insert operation + air::runner::execute_air: 16.20ms + preparation_step::preparation::parse_data: 4.01ms + from_slice: 3.96ms + preparation_step::preparation::prepare: 613.00µs + air::preparation_step::preparation::make_exec_ctx: 347.00µs + air_parser::parser::air_parser::parse: 55.00µs + runner::execute: 2.76ms + runner::farewell: 3.22ms + from_success_result: 3.19ms + populate_outcome_from_contexts: 2.78ms + signing_step::sign_produced_cids: 186.00µs + verification_step::verify: 5.30ms + verify: 4.68ms + canon-map-key-element-by-lens (16.20ms; 56.625 MiB, 56.625 MiB): benchmarking a map insert operation + air::runner::execute_air: 16.20ms + preparation_step::preparation::parse_data: 3.98ms + from_slice: 3.93ms + preparation_step::preparation::prepare: 610.00µs + air::preparation_step::preparation::make_exec_ctx: 344.00µs + air_parser::parser::air_parser::parse: 56.00µs + runner::execute: 2.76ms + runner::farewell: 3.20ms + from_success_result: 3.18ms + populate_outcome_from_contexts: 2.78ms + signing_step::sign_produced_cids: 185.00µs + verification_step::verify: 5.30ms + verify: 4.68ms + canon-map-multiple-keys (13.20ms; 54.500 MiB, 54.500 MiB): benchmarking a map insert operation + air::runner::execute_air: 13.20ms + preparation_step::preparation::parse_data: 349.00µs + from_slice: 306.00µs + preparation_step::preparation::prepare: 262.00µs + air::preparation_step::preparation::make_exec_ctx: 15.00µs + air_parser::parser::air_parser::parse: 44.00µs + runner::execute: 8.88ms + runner::farewell: 2.70ms + from_success_result: 2.68ms + populate_outcome_from_contexts: 2.36ms + signing_step::sign_produced_cids: 184.00µs + verification_step::verify: 636.00µs + verify: 26.00µs + canon-map-scalar-multiple-keys (5.52ms; 53.125 MiB, 53.125 MiB): benchmarking a map insert operation + air::runner::execute_air: 5.52ms + preparation_step::preparation::parse_data: 365.00µs + from_slice: 312.00µs + preparation_step::preparation::prepare: 284.00µs + air::preparation_step::preparation::make_exec_ctx: 19.00µs + air_parser::parser::air_parser::parse: 47.00µs + runner::execute: 3.34ms + runner::farewell: 536.00µs + from_success_result: 505.00µs + populate_outcome_from_contexts: 452.00µs + signing_step::sign_produced_cids: 191.00µs + verification_step::verify: 650.00µs + verify: 31.00µs + canon-map-scalar-single-key (4.46ms; 53.000 MiB, 53.000 MiB): benchmarking a map insert operation + air::runner::execute_air: 4.46ms + preparation_step::preparation::parse_data: 370.00µs + from_slice: 324.00µs + preparation_step::preparation::prepare: 262.00µs + air::preparation_step::preparation::make_exec_ctx: 16.00µs + air_parser::parser::air_parser::parse: 40.00µs + runner::execute: 2.32ms + runner::farewell: 513.00µs + from_success_result: 490.00µs + populate_outcome_from_contexts: 434.00µs + signing_step::sign_produced_cids: 185.00µs + verification_step::verify: 680.00µs + verify: 69.00µs + canon-map-single-key (11.30ms; 55.312 MiB, 55.312 MiB): benchmarking a map insert operation + air::runner::execute_air: 11.30ms + preparation_step::preparation::parse_data: 366.00µs + from_slice: 323.00µs + preparation_step::preparation::prepare: 257.00µs + air::preparation_step::preparation::make_exec_ctx: 15.00µs + air_parser::parser::air_parser::parse: 40.00µs + runner::execute: 6.70ms + runner::farewell: 3.01ms + from_success_result: 2.98ms + populate_outcome_from_contexts: 2.71ms + signing_step::sign_produced_cids: 185.00µs + verification_step::verify: 678.00µs + verify: 68.00µs + dashboard (10.70ms; 52.625 MiB, 52.625 MiB): big dashboard test + air::runner::execute_air: 10.70ms + preparation_step::preparation::parse_data: 1.43ms + from_slice: 1.37ms + preparation_step::preparation::prepare: 384.00µs + air::preparation_step::preparation::make_exec_ctx: 41.00µs + air_parser::parser::air_parser::parse: 135.00µs + runner::execute: 2.28ms + to_string(tetraplets): 471.00µs + runner::farewell: 834.00µs + from_success_result: 810.00µs + populate_outcome_from_contexts: 753.00µs + signing_step::sign_produced_cids: 187.00µs + verification_step::verify: 5.46ms + verify: 223.00µs + long-data (6.81ms; 53.812 MiB, 53.812 MiB): Long data trace + air::runner::execute_air: 6.81ms + preparation_step::preparation::parse_data: 2.40ms + from_slice: 2.35ms + preparation_step::preparation::prepare: 264.00µs + air::preparation_step::preparation::make_exec_ctx: 44.00µs + air_parser::parser::air_parser::parse: 17.00µs + runner::execute: 10.00µs + runner::farewell: 1.17ms + from_success_result: 1.15ms + populate_outcome_from_contexts: 1.11ms + signing_step::sign_produced_cids: 190.00µs + verification_step::verify: 2.65ms + verify: 949.00µs + multiple-cids10 (3.78ms; 52.438 MiB, 52.438 MiB): verifying multiple CIDs for single peer + air::runner::execute_air: 3.78ms + preparation_step::preparation::parse_data: 495.00µs + from_slice: 435.00µs + preparation_step::preparation::prepare: 286.00µs + air::preparation_step::preparation::make_exec_ctx: 34.00µs + air_parser::parser::air_parser::parse: 44.00µs + runner::execute: 578.00µs + to_string(tetraplets): 14.00µs + runner::farewell: 537.00µs + from_success_result: 513.00µs + populate_outcome_from_contexts: 452.00µs + signing_step::sign_produced_cids: 185.00µs + verification_step::verify: 1.57ms + verify: 259.00µs + multiple-peers8 (15.50ms; 53.375 MiB, 53.375 MiB): verifying many CIDs for many peers + air::runner::execute_air: 15.50ms + preparation_step::preparation::parse_data: 1.85ms + from_slice: 1.78ms + preparation_step::preparation::prepare: 408.00µs + air::preparation_step::preparation::make_exec_ctx: 143.00µs + air_parser::parser::air_parser::parse: 51.00µs + runner::execute: 3.92ms + to_string(tetraplets): 17.00µs + runner::farewell: 1.59ms + from_success_result: 1.56ms + populate_outcome_from_contexts: 1.44ms + signing_step::sign_produced_cids: 193.00µs + verification_step::verify: 7.44ms + verify: 1.23ms + multiple-sigs30 (26.00ms; 56.188 MiB, 56.188 MiB): signing multiple CIDs + air::runner::execute_air: 26.00ms + preparation_step::preparation::parse_data: 5.05ms + from_slice: 4.98ms + preparation_step::preparation::prepare: 500.00µs + air::preparation_step::preparation::make_exec_ctx: 230.00µs + air_parser::parser::air_parser::parse: 57.00µs + runner::execute: 10.30ms + runner::farewell: 4.21ms + from_success_result: 4.18ms + populate_outcome_from_contexts: 3.99ms + signing_step::sign_produced_cids: 781.00µs + verification_step::verify: 5.00ms + verify: 2.14ms + network-explore (5.14ms; 52.375 MiB, 52.375 MiB): 5 peers of network are discovered + air::runner::execute_air: 5.14ms + preparation_step::preparation::parse_data: 666.00µs + from_slice: 603.00µs + preparation_step::preparation::prepare: 299.00µs + air::preparation_step::preparation::make_exec_ctx: 22.00µs + air_parser::parser::air_parser::parse: 65.00µs + runner::execute: 187.00µs + to_string(tetraplets): 14.00µs + runner::farewell: 459.00µs + from_success_result: 434.00µs + populate_outcome_from_contexts: 388.00µs + signing_step::sign_produced_cids: 200.00µs + verification_step::verify: 3.20ms + verify: 66.00µs + populate-map (3.81ms; 51.938 MiB, 51.938 MiB): benchmarking a map insert operation + air::runner::execute_air: 3.81ms + preparation_step::preparation::parse_data: 130.00µs + from_slice: 91.00µs + preparation_step::preparation::prepare: 278.00µs + air::preparation_step::preparation::make_exec_ctx: 16.00µs + air_parser::parser::air_parser::parse: 49.00µs + runner::execute: 2.83ms + runner::farewell: 423.00µs + from_success_result: 398.00µs + populate_outcome_from_contexts: 349.00µs + signing_step::sign_produced_cids: 10.00µs + verification_step::verify: 13.00µs + populate-map-multiple-keys (4.63ms; 53.000 MiB, 53.000 MiB): benchmarking a map insert operation + air::runner::execute_air: 4.63ms + preparation_step::preparation::parse_data: 139.00µs + from_slice: 94.00µs + preparation_step::preparation::prepare: 266.00µs + air::preparation_step::preparation::make_exec_ctx: 16.00µs + air_parser::parser::air_parser::parse: 47.00µs + runner::execute: 2.83ms + runner::farewell: 439.00µs + from_success_result: 416.00µs + populate_outcome_from_contexts: 373.00µs + signing_step::sign_produced_cids: 184.00µs + verification_step::verify: 636.00µs + verify: 26.00µs + populate-map-single-key (3.77ms; 52.875 MiB, 52.875 MiB): benchmarking a map insert operation + air::runner::execute_air: 3.77ms + preparation_step::preparation::parse_data: 195.00µs + from_slice: 152.00µs + preparation_step::preparation::prepare: 263.00µs + air::preparation_step::preparation::make_exec_ctx: 16.00µs + air_parser::parser::air_parser::parse: 43.00µs + runner::execute: 1.86ms + runner::farewell: 456.00µs + from_success_result: 433.00µs + populate_outcome_from_contexts: 378.00µs + signing_step::sign_produced_cids: 185.00µs + verification_step::verify: 684.00µs + verify: 68.00µs Machine c1f3ea5950db0a10b44da931c25774d64ab25084f47d504f72f311e694550ff1: Platform: macOS-12.0.1-x86_64-i386-64bit Timestamp: 2023-02-13 13:19:34.106863+00:00 @@ -410,68 +643,152 @@ Machine c1f3ea5950db0a10b44da931c25774d64ab25084f47d504f72f311e694550ff1: new: 38.00µs Machine d77ebe8481884bc3b2778c8083f1bf459e548e929edd87041beb14f6b868d35f: Platform: macOS-14.0-arm64-arm-64bit - Timestamp: 2023-10-20 13:46:12.008371+00:00 + Timestamp: 2023-11-06 18:49:22.923773+00:00 AquaVM version: 0.53.0 Benches: Features: check_signatures,gen_signatures - big_values_data (8.70ms; 58.938 MiB, 58.938 MiB): Loading a trace with huge values - air::runner::execute_air: 8.70ms - preparation_step::preparation::parse_data: 4.88ms - from_slice: 4.83ms + big_values_data (8.59ms; 58.938 MiB, 58.938 MiB): Loading a trace with huge values + air::runner::execute_air: 8.59ms + preparation_step::preparation::parse_data: 4.79ms + from_slice: 4.74ms preparation_step::preparation::prepare: 170.00µs - air::preparation_step::preparation::make_exec_ctx: 18.00µs - air_parser::parser::air_parser::parse: 28.00µs - runner::execute: 12.00µs - runner::farewell: 3.30ms - from_success_result: 3.28ms - populate_outcome_from_contexts: 3.24ms - signing_step::sign_produced_cids: 102.00µs - verification_step::verify: 79.00µs - verify: 10.00µs - dashboard (6.55ms; 52.625 MiB, 52.625 MiB): big dashboard test - air::runner::execute_air: 6.55ms + air::preparation_step::preparation::make_exec_ctx: 14.00µs + air_parser::parser::air_parser::parse: 33.00µs + runner::execute: 13.00µs + runner::farewell: 3.25ms + from_success_result: 3.23ms + populate_outcome_from_contexts: 3.19ms + signing_step::sign_produced_cids: 100.00µs + verification_step::verify: 85.00µs + verify: 13.00µs + canon-map-key-by-lens (11.57ms; 56.625 MiB, 56.625 MiB): benchmarking a map insert operation + air::runner::execute_air: 11.57ms + preparation_step::preparation::parse_data: 3.11ms + from_slice: 3.06ms + preparation_step::preparation::prepare: 382.00µs + air::preparation_step::preparation::make_exec_ctx: 185.00µs + air_parser::parser::air_parser::parse: 74.00µs + runner::execute: 1.92ms + runner::farewell: 1.83ms + from_success_result: 1.81ms + populate_outcome_from_contexts: 1.46ms + signing_step::sign_produced_cids: 95.00µs + verification_step::verify: 4.07ms + verify: 3.72ms + canon-map-key-element-by-lens (11.55ms; 56.625 MiB, 56.625 MiB): benchmarking a map insert operation + air::runner::execute_air: 11.55ms + preparation_step::preparation::parse_data: 3.10ms + from_slice: 3.06ms + preparation_step::preparation::prepare: 379.00µs + air::preparation_step::preparation::make_exec_ctx: 184.00µs + air_parser::parser::air_parser::parse: 74.00µs + runner::execute: 1.90ms + runner::farewell: 1.81ms + from_success_result: 1.79ms + populate_outcome_from_contexts: 1.46ms + signing_step::sign_produced_cids: 95.00µs + verification_step::verify: 4.08ms + verify: 3.73ms + canon-map-multiple-keys (9.83ms; 54.500 MiB, 54.500 MiB): benchmarking a map insert operation + air::runner::execute_air: 9.83ms + preparation_step::preparation::parse_data: 397.00µs + from_slice: 352.00µs + preparation_step::preparation::prepare: 196.00µs + air::preparation_step::preparation::make_exec_ctx: 15.00µs + air_parser::parser::air_parser::parse: 58.00µs + runner::execute: 6.93ms + runner::farewell: 1.62ms + from_success_result: 1.60ms + populate_outcome_from_contexts: 1.31ms + signing_step::sign_produced_cids: 96.00µs + verification_step::verify: 405.00µs + verify: 50.00µs + canon-map-scalar-multiple-keys (4.05ms; 53.125 MiB, 53.125 MiB): benchmarking a map insert operation + air::runner::execute_air: 4.05ms + preparation_step::preparation::parse_data: 400.00µs + from_slice: 354.00µs + preparation_step::preparation::prepare: 200.00µs + air::preparation_step::preparation::make_exec_ctx: 15.00µs + air_parser::parser::air_parser::parse: 60.00µs + runner::execute: 2.42ms + runner::farewell: 350.00µs + from_success_result: 331.00µs + populate_outcome_from_contexts: 294.00µs + signing_step::sign_produced_cids: 95.00µs + verification_step::verify: 404.00µs + verify: 50.00µs + canon-map-scalar-single-key (3.27ms; 53.000 MiB, 53.000 MiB): benchmarking a map insert operation + air::runner::execute_air: 3.27ms + preparation_step::preparation::parse_data: 412.00µs + from_slice: 364.00µs + preparation_step::preparation::prepare: 193.00µs + air::preparation_step::preparation::make_exec_ctx: 15.00µs + air_parser::parser::air_parser::parse: 55.00µs + runner::execute: 1.58ms + runner::farewell: 356.00µs + from_success_result: 336.00µs + populate_outcome_from_contexts: 283.00µs + signing_step::sign_produced_cids: 95.00µs + verification_step::verify: 447.00µs + verify: 92.00µs + canon-map-single-key (8.25ms; 55.312 MiB, 55.312 MiB): benchmarking a map insert operation + air::runner::execute_air: 8.25ms + preparation_step::preparation::parse_data: 414.00µs + from_slice: 366.00µs + preparation_step::preparation::prepare: 193.00µs + air::preparation_step::preparation::make_exec_ctx: 15.00µs + air_parser::parser::air_parser::parse: 56.00µs + runner::execute: 5.19ms + runner::farewell: 1.71ms + from_success_result: 1.69ms + populate_outcome_from_contexts: 1.45ms + signing_step::sign_produced_cids: 96.00µs + verification_step::verify: 449.00µs + verify: 95.00µs + dashboard (6.74ms; 52.625 MiB, 52.625 MiB): big dashboard test + air::runner::execute_air: 6.74ms preparation_step::preparation::parse_data: 1.00ms - from_slice: 946.00µs - preparation_step::preparation::prepare: 314.00µs - air::preparation_step::preparation::make_exec_ctx: 34.00µs - air_parser::parser::air_parser::parse: 160.00µs - runner::execute: 1.63ms - to_string(tetraplets): 350.00µs - runner::farewell: 460.00µs - from_success_result: 440.00µs - populate_outcome_from_contexts: 393.00µs - signing_step::sign_produced_cids: 102.00µs - verification_step::verify: 2.88ms - verify: 161.00µs + from_slice: 947.00µs + preparation_step::preparation::prepare: 318.00µs + air::preparation_step::preparation::make_exec_ctx: 32.00µs + air_parser::parser::air_parser::parse: 163.00µs + runner::execute: 1.70ms + to_string(tetraplets): 362.00µs + runner::farewell: 462.00µs + from_success_result: 442.00µs + populate_outcome_from_contexts: 399.00µs + signing_step::sign_produced_cids: 100.00µs + verification_step::verify: 2.97ms + verify: 215.00µs long_data (3.64ms; 53.750 MiB, 53.750 MiB): Long data trace air::runner::execute_air: 3.64ms - preparation_step::preparation::parse_data: 1.75ms - from_slice: 1.71ms - preparation_step::preparation::prepare: 166.00µs - air::preparation_step::preparation::make_exec_ctx: 17.00µs - air_parser::parser::air_parser::parse: 26.00µs + preparation_step::preparation::parse_data: 1.77ms + from_slice: 1.72ms + preparation_step::preparation::prepare: 172.00µs + air::preparation_step::preparation::make_exec_ctx: 14.00µs + air_parser::parser::air_parser::parse: 30.00µs runner::execute: 12.00µs - runner::farewell: 929.00µs - from_success_result: 910.00µs - populate_outcome_from_contexts: 871.00µs + runner::farewell: 926.00µs + from_success_result: 906.00µs + populate_outcome_from_contexts: 867.00µs signing_step::sign_produced_cids: 102.00µs - verification_step::verify: 522.00µs + verification_step::verify: 529.00µs verify: 10.00µs - multiple-cids10 (2.65ms; 52.438 MiB, 52.438 MiB): verifying multiple CIDs for single peer - air::runner::execute_air: 2.65ms - preparation_step::preparation::parse_data: 427.00µs - from_slice: 369.00µs - preparation_step::preparation::prepare: 208.00µs - air::preparation_step::preparation::make_exec_ctx: 25.00µs + multiple-cids10 (2.63ms; 52.438 MiB, 52.438 MiB): verifying multiple CIDs for single peer + air::runner::execute_air: 2.63ms + preparation_step::preparation::parse_data: 417.00µs + from_slice: 363.00µs + preparation_step::preparation::prepare: 205.00µs + air::preparation_step::preparation::make_exec_ctx: 26.00µs air_parser::parser::air_parser::parse: 58.00µs - runner::execute: 448.00µs + runner::execute: 446.00µs to_string(tetraplets): 10.00µs - runner::farewell: 322.00µs - from_success_result: 301.00µs - populate_outcome_from_contexts: 254.00µs - signing_step::sign_produced_cids: 98.00µs - verification_step::verify: 957.00µs - verify: 238.00µs + runner::farewell: 321.00µs + from_success_result: 300.00µs + populate_outcome_from_contexts: 252.00µs + signing_step::sign_produced_cids: 100.00µs + verification_step::verify: 952.00µs + verify: 240.00µs multiple-cids50 (24.68ms; 59.375 MiB, 59.375 MiB): verifying multiple CIDs for single peer air::runner::execute_air: 24.68ms preparation_step::preparation::parse_data: 4.87ms @@ -538,21 +855,21 @@ Machine d77ebe8481884bc3b2778c8083f1bf459e548e929edd87041beb14f6b868d35f: signing_step::sign_produced_cids: 109.00µs verification_step::verify: 2.48ms verify: 289.00µs - multiple-peers8 (9.48ms; 53.375 MiB, 53.375 MiB): verifying many CIDs for many peers - air::runner::execute_air: 9.48ms + multiple-peers8 (9.96ms; 53.375 MiB, 53.375 MiB): verifying many CIDs for many peers + air::runner::execute_air: 9.96ms preparation_step::preparation::parse_data: 1.36ms from_slice: 1.31ms preparation_step::preparation::prepare: 254.00µs - air::preparation_step::preparation::make_exec_ctx: 72.00µs - air_parser::parser::air_parser::parse: 62.00µs - runner::execute: 2.72ms + air::preparation_step::preparation::make_exec_ctx: 70.00µs + air_parser::parser::air_parser::parse: 63.00µs + runner::execute: 2.87ms to_string(tetraplets): 10.00µs - runner::farewell: 915.00µs - from_success_result: 896.00µs - populate_outcome_from_contexts: 788.00µs - signing_step::sign_produced_cids: 102.00µs + runner::farewell: 901.00µs + from_success_result: 881.00µs + populate_outcome_from_contexts: 783.00µs + signing_step::sign_produced_cids: 99.00µs verification_step::verify: 3.97ms - verify: 762.00µs + verify: 1.02ms multiple-sigs10 (13.63ms; 52.875 MiB, 52.875 MiB): signing multiple CIDs air::runner::execute_air: 13.63ms preparation_step::preparation::parse_data: 653.00µs @@ -587,15 +904,15 @@ Machine d77ebe8481884bc3b2778c8083f1bf459e548e929edd87041beb14f6b868d35f: signing_step::sign_produced_cids: 22.05ms verification_step::verify: 153.40ms verify: 84.07ms - multiple-sigs30 (17.29ms; 56.188 MiB, 56.188 MiB): signing multiple CIDs - air::runner::execute_air: 17.29ms - preparation_step::preparation::parse_data: 3.90ms - from_slice: 3.85ms + multiple-sigs30 (18.99ms; 56.188 MiB, 56.188 MiB): signing multiple CIDs + air::runner::execute_air: 18.99ms + preparation_step::preparation::parse_data: 3.94ms + from_slice: 3.88ms preparation_step::preparation::prepare: 332.00µs - air::preparation_step::preparation::make_exec_ctx: 152.00µs - air_parser::parser::air_parser::parse: 61.00µs - runner::execute: 6.87ms - runner::farewell: 2.57ms + air::preparation_step::preparation::make_exec_ctx: 147.00µs + air_parser::parser::air_parser::parse: 62.00µs + runner::execute: 8.10ms + runner::farewell: 2.55ms from_success_result: 2.54ms populate_outcome_from_contexts: 2.36ms signing_step::sign_produced_cids: 442.00µs @@ -615,21 +932,21 @@ Machine d77ebe8481884bc3b2778c8083f1bf459e548e929edd87041beb14f6b868d35f: signing_step::sign_produced_cids: 1.23ms verification_step::verify: 8.51ms verify: 4.56ms - network-explore (3.06ms; 52.375 MiB, 52.375 MiB): 5 peers of network are discovered - air::runner::execute_air: 3.06ms - preparation_step::preparation::parse_data: 484.00µs - from_slice: 428.00µs + network-explore (3.13ms; 52.375 MiB, 52.375 MiB): 5 peers of network are discovered + air::runner::execute_air: 3.13ms + preparation_step::preparation::parse_data: 482.00µs + from_slice: 427.00µs preparation_step::preparation::prepare: 220.00µs - air::preparation_step::preparation::make_exec_ctx: 22.00µs - air_parser::parser::air_parser::parse: 76.00µs - runner::execute: 162.00µs + air::preparation_step::preparation::make_exec_ctx: 19.00µs + air_parser::parser::air_parser::parse: 75.00µs + runner::execute: 167.00µs to_string(tetraplets): 13.00µs - runner::farewell: 256.00µs - from_success_result: 236.00µs - populate_outcome_from_contexts: 194.00µs - signing_step::sign_produced_cids: 101.00µs - verification_step::verify: 1.69ms - verify: 67.00µs + runner::farewell: 252.00µs + from_success_result: 232.00µs + populate_outcome_from_contexts: 195.00µs + signing_step::sign_produced_cids: 100.00µs + verification_step::verify: 1.72ms + verify: 80.00µs network_explore (5.23ms; 52.500 MiB, 52.500 MiB): 5 peers of network are discovered air::runner::execute_air: 5.23ms preparation_step::preparation::parse_data: 480.00µs @@ -651,96 +968,124 @@ Machine d77ebe8481884bc3b2778c8083f1bf459e548e929edd87041beb14f6b868d35f: signing_step::sign_produced_cids: 112.00µs verification_step::verify: 1.73ms verify: 76.00µs - null (725.00µs; 52.375 MiB, 52.375 MiB): Empty data and null script - air::runner::execute_air: 725.00µs + null (749.00µs; 52.375 MiB, 52.375 MiB): Empty data and null script + air::runner::execute_air: 749.00µs preparation_step::preparation::parse_data: 29.00µs - preparation_step::preparation::prepare: 179.00µs - air::preparation_step::preparation::make_exec_ctx: 19.00µs - air_parser::parser::air_parser::parse: 33.00µs + preparation_step::preparation::prepare: 183.00µs + air::preparation_step::preparation::make_exec_ctx: 14.00µs + air_parser::parser::air_parser::parse: 31.00µs runner::execute: 11.00µs runner::farewell: 180.00µs from_success_result: 160.00µs populate_outcome_from_contexts: 123.00µs signing_step::sign_produced_cids: 109.00µs - verification_step::verify: 45.00µs + verification_step::verify: 39.00µs verify: 12.00µs - parser_10000_100 (23.33ms; 57.688 MiB, 57.688 MiB): Running very long AIR script with lot of variables and assignments - air::runner::execute_air: 23.33ms - preparation_step::preparation::parse_data: 28.00µs - preparation_step::preparation::prepare: 21.73ms - air::preparation_step::preparation::make_exec_ctx: 18.00µs - air_parser::parser::air_parser::parse: 21.55ms - runner::execute: 54.00µs - runner::farewell: 179.00µs - from_success_result: 160.00µs - populate_outcome_from_contexts: 122.00µs - signing_step::sign_produced_cids: 113.00µs + parser_10000_100 (23.60ms; 57.688 MiB, 57.688 MiB): Running very long AIR script with lot of variables and assignments + air::runner::execute_air: 23.60ms + preparation_step::preparation::parse_data: 22.00µs + preparation_step::preparation::prepare: 21.93ms + air::preparation_step::preparation::make_exec_ctx: 14.00µs + air_parser::parser::air_parser::parse: 21.79ms + runner::execute: 56.00µs + runner::farewell: 178.00µs + from_success_result: 158.00µs + populate_outcome_from_contexts: 126.00µs + signing_step::sign_produced_cids: 104.00µs verification_step::verify: 44.00µs verify: 12.00µs + populate-map-multiple-keys (3.42ms; 53.000 MiB, 53.000 MiB): benchmarking a map insert operation + air::runner::execute_air: 3.42ms + preparation_step::preparation::parse_data: 151.00µs + from_slice: 107.00µs + preparation_step::preparation::prepare: 197.00µs + air::preparation_step::preparation::make_exec_ctx: 15.00µs + air_parser::parser::air_parser::parse: 60.00µs + runner::execute: 2.12ms + runner::farewell: 289.00µs + from_success_result: 269.00µs + populate_outcome_from_contexts: 233.00µs + signing_step::sign_produced_cids: 96.00µs + verification_step::verify: 392.00µs + verify: 48.00µs + populate-map-single-key (2.71ms; 52.938 MiB, 52.938 MiB): benchmarking a map insert operation + air::runner::execute_air: 2.71ms + preparation_step::preparation::parse_data: 207.00µs + from_slice: 163.00µs + preparation_step::preparation::prepare: 194.00µs + air::preparation_step::preparation::make_exec_ctx: 15.00µs + air_parser::parser::air_parser::parse: 58.00µs + runner::execute: 1.29ms + runner::farewell: 311.00µs + from_success_result: 290.00µs + populate_outcome_from_contexts: 236.00µs + signing_step::sign_produced_cids: 95.00µs + verification_step::verify: 435.00µs + verify: 93.00µs Machine e536f8eaae8c978493a773ba566ae3393e2e6240d6ea8e05b5ca1b8f77e9c441: Platform: Linux-5.15.0-76-generic-x86_64-with-glibc2.29 - Timestamp: 2023-10-20 13:56:40.619386+00:00 + Timestamp: 2023-10-20 12:46:01.094988+00:00 AquaVM version: 0.53.0 Benches: Features: check_signatures,gen_signatures - big_values_data (11.90ms; 58.938 MiB, 58.938 MiB): Loading a trace with huge values - air::runner::execute_air: 11.90ms - preparation_step::preparation::parse_data: 6.61ms - from_slice: 6.55ms - preparation_step::preparation::prepare: 221.00µs + big_values_data (12.11ms; 58.938 MiB, 58.938 MiB): Loading a trace with huge values + air::runner::execute_air: 12.11ms + preparation_step::preparation::parse_data: 6.80ms + from_slice: 6.74ms + preparation_step::preparation::prepare: 226.00µs air::preparation_step::preparation::make_exec_ctx: 18.00µs air_parser::parser::air_parser::parse: 19.00µs runner::execute: 10.00µs - runner::farewell: 4.68ms - from_success_result: 4.66ms - populate_outcome_from_contexts: 4.60ms + runner::farewell: 4.70ms + from_success_result: 4.68ms + populate_outcome_from_contexts: 4.62ms signing_step::sign_produced_cids: 159.00µs verification_step::verify: 86.00µs verify: 11.00µs - dashboard (9.39ms; 52.625 MiB, 52.625 MiB): big dashboard test - air::runner::execute_air: 9.39ms - preparation_step::preparation::parse_data: 1.28ms - from_slice: 1.22ms - preparation_step::preparation::prepare: 351.00µs - air::preparation_step::preparation::make_exec_ctx: 41.00µs - air_parser::parser::air_parser::parse: 132.00µs - runner::execute: 2.22ms - to_string(tetraplets): 448.00µs - runner::farewell: 679.00µs - from_success_result: 657.00µs - populate_outcome_from_contexts: 606.00µs + dashboard (9.52ms; 52.625 MiB, 52.625 MiB): big dashboard test + air::runner::execute_air: 9.52ms + preparation_step::preparation::parse_data: 1.26ms + from_slice: 1.21ms + preparation_step::preparation::prepare: 354.00µs + air::preparation_step::preparation::make_exec_ctx: 42.00µs + air_parser::parser::air_parser::parse: 135.00µs + runner::execute: 2.27ms + to_string(tetraplets): 449.00µs + runner::farewell: 672.00µs + from_success_result: 651.00µs + populate_outcome_from_contexts: 601.00µs signing_step::sign_produced_cids: 161.00µs verification_step::verify: 4.57ms - verify: 209.00µs - long_data (4.62ms; 53.750 MiB, 53.750 MiB): Long data trace - air::runner::execute_air: 4.62ms - preparation_step::preparation::parse_data: 2.28ms - from_slice: 2.24ms + verify: 267.00µs + long_data (4.57ms; 53.750 MiB, 53.750 MiB): Long data trace + air::runner::execute_air: 4.57ms + preparation_step::preparation::parse_data: 2.27ms + from_slice: 2.23ms preparation_step::preparation::prepare: 216.00µs air::preparation_step::preparation::make_exec_ctx: 16.00µs - air_parser::parser::air_parser::parse: 19.00µs + air_parser::parser::air_parser::parse: 18.00µs runner::execute: 9.00µs - runner::farewell: 1.14ms - from_success_result: 1.11ms - populate_outcome_from_contexts: 1.07ms - signing_step::sign_produced_cids: 158.00µs - verification_step::verify: 686.00µs + runner::farewell: 1.13ms + from_success_result: 1.14ms + populate_outcome_from_contexts: 1.10ms + signing_step::sign_produced_cids: 157.00µs + verification_step::verify: 662.00µs verify: 11.00µs - multiple-cids10 (3.42ms; 52.438 MiB, 52.438 MiB): verifying multiple CIDs for single peer - air::runner::execute_air: 3.42ms - preparation_step::preparation::parse_data: 450.00µs - from_slice: 400.00µs - preparation_step::preparation::prepare: 253.00µs - air::preparation_step::preparation::make_exec_ctx: 32.00µs - air_parser::parser::air_parser::parse: 43.00µs - runner::execute: 580.00µs - to_string(tetraplets): 13.00µs - runner::farewell: 455.00µs - from_success_result: 434.00µs - populate_outcome_from_contexts: 380.00µs - signing_step::sign_produced_cids: 158.00µs - verification_step::verify: 1.41ms - verify: 303.00µs + multiple-cids10 (3.53ms; 52.438 MiB, 52.438 MiB): verifying multiple CIDs for single peer + air::runner::execute_air: 3.53ms + preparation_step::preparation::parse_data: 467.00µs + from_slice: 413.00µs + preparation_step::preparation::prepare: 263.00µs + air::preparation_step::preparation::make_exec_ctx: 34.00µs + air_parser::parser::air_parser::parse: 47.00µs + runner::execute: 593.00µs + to_string(tetraplets): 14.00µs + runner::farewell: 470.00µs + from_success_result: 448.00µs + populate_outcome_from_contexts: 392.00µs + signing_step::sign_produced_cids: 161.00µs + verification_step::verify: 1.45ms + verify: 317.00µs multiple-cids50 (323.00ms; 59.375 MiB, 59.375 MiB): verifying multiple CIDs for single peer air::runner::execute_air: 323.00ms preparation_step::preparation::parse_data: 6.79ms @@ -804,21 +1149,21 @@ Machine e536f8eaae8c978493a773ba566ae3393e2e6240d6ea8e05b5ca1b8f77e9c441: signing_step::sign_produced_cids: 190.00µs verification_step::verify: 70.22ms verify: 44.09ms - multiple-peers8 (13.55ms; 53.375 MiB, 53.375 MiB): verifying many CIDs for many peers - air::runner::execute_air: 13.55ms - preparation_step::preparation::parse_data: 1.72ms - from_slice: 1.66ms - preparation_step::preparation::prepare: 332.00µs + multiple-peers8 (14.36ms; 53.375 MiB, 53.375 MiB): verifying many CIDs for many peers + air::runner::execute_air: 14.36ms + preparation_step::preparation::parse_data: 1.74ms + from_slice: 1.68ms + preparation_step::preparation::prepare: 333.00µs air::preparation_step::preparation::make_exec_ctx: 102.00µs - air_parser::parser::air_parser::parse: 51.00µs + air_parser::parser::air_parser::parse: 50.00µs runner::execute: 3.62ms to_string(tetraplets): 16.00µs - runner::farewell: 1.31ms - from_success_result: 1.28ms - populate_outcome_from_contexts: 1.17ms - signing_step::sign_produced_cids: 158.00µs - verification_step::verify: 6.26ms - verify: 1.11ms + runner::farewell: 1.30ms + from_success_result: 1.31ms + populate_outcome_from_contexts: 1.16ms + signing_step::sign_produced_cids: 161.00µs + verification_step::verify: 6.74ms + verify: 1.45ms multiple-sigs200 (6.04s; 214.375 MiB, 214.375 MiB): signing multiple CIDs air::runner::execute_air: 6.04s preparation_step::preparation::parse_data: 219.80ms @@ -839,20 +1184,20 @@ Machine e536f8eaae8c978493a773ba566ae3393e2e6240d6ea8e05b5ca1b8f77e9c441: signing_step::sign_produced_cids: 30.84ms verification_step::verify: 214.00ms verify: 119.20ms - multiple-sigs30 (24.47ms; 56.188 MiB, 56.188 MiB): signing multiple CIDs - air::runner::execute_air: 24.47ms - preparation_step::preparation::parse_data: 4.91ms - from_slice: 4.85ms - preparation_step::preparation::prepare: 441.00µs - air::preparation_step::preparation::make_exec_ctx: 215.00µs - air_parser::parser::air_parser::parse: 49.00µs - runner::execute: 10.13ms - runner::farewell: 3.75ms - from_success_result: 3.73ms - populate_outcome_from_contexts: 3.55ms - signing_step::sign_produced_cids: 674.00µs - verification_step::verify: 4.45ms - verify: 1.94ms + multiple-sigs30 (26.89ms; 56.188 MiB, 56.188 MiB): signing multiple CIDs + air::runner::execute_air: 26.89ms + preparation_step::preparation::parse_data: 5.04ms + from_slice: 4.99ms + preparation_step::preparation::prepare: 454.00µs + air::preparation_step::preparation::make_exec_ctx: 219.00µs + air_parser::parser::air_parser::parse: 50.00µs + runner::execute: 11.80ms + runner::farewell: 3.74ms + from_success_result: 3.71ms + populate_outcome_from_contexts: 3.54ms + signing_step::sign_produced_cids: 678.00µs + verification_step::verify: 5.03ms + verify: 2.50ms multiple-sigs50 (369.10ms; 62.562 MiB, 62.562 MiB): signing multiple CIDs air::runner::execute_air: 369.10ms preparation_step::preparation::parse_data: 13.94ms @@ -873,44 +1218,44 @@ Machine e536f8eaae8c978493a773ba566ae3393e2e6240d6ea8e05b5ca1b8f77e9c441: signing_step::sign_produced_cids: 1.77ms verification_step::verify: 12.49ms verify: 6.96ms - network-explore (4.36ms; 52.375 MiB, 52.375 MiB): 5 peers of network are discovered - air::runner::execute_air: 4.36ms - preparation_step::preparation::parse_data: 575.00µs - from_slice: 520.00µs - preparation_step::preparation::prepare: 264.00µs + network-explore (4.43ms; 52.375 MiB, 52.375 MiB): 5 peers of network are discovered + air::runner::execute_air: 4.43ms + preparation_step::preparation::parse_data: 572.00µs + from_slice: 519.00µs + preparation_step::preparation::prepare: 268.00µs air::preparation_step::preparation::make_exec_ctx: 23.00µs - air_parser::parser::air_parser::parse: 66.00µs - runner::execute: 188.00µs - to_string(tetraplets): 17.00µs - runner::farewell: 361.00µs - from_success_result: 340.00µs - populate_outcome_from_contexts: 298.00µs - signing_step::sign_produced_cids: 160.00µs - verification_step::verify: 2.68ms - verify: 65.00µs - null (828.00µs; 52.375 MiB, 52.375 MiB): Empty data and null script - air::runner::execute_air: 828.00µs + air_parser::parser::air_parser::parse: 67.00µs + runner::execute: 190.00µs + to_string(tetraplets): 13.00µs + runner::farewell: 366.00µs + from_success_result: 344.00µs + populate_outcome_from_contexts: 301.00µs + signing_step::sign_produced_cids: 162.00µs + verification_step::verify: 2.75ms + verify: 79.00µs + null (848.00µs; 52.375 MiB, 52.375 MiB): Empty data and null script + air::runner::execute_air: 848.00µs preparation_step::preparation::parse_data: 18.00µs - preparation_step::preparation::prepare: 219.00µs + preparation_step::preparation::prepare: 224.00µs air::preparation_step::preparation::make_exec_ctx: 16.00µs air_parser::parser::air_parser::parse: 19.00µs - runner::execute: 10.00µs - runner::farewell: 249.00µs - from_success_result: 227.00µs - populate_outcome_from_contexts: 188.00µs - signing_step::sign_produced_cids: 157.00µs - verification_step::verify: 38.00µs + runner::execute: 9.00µs + runner::farewell: 257.00µs + from_success_result: 234.00µs + populate_outcome_from_contexts: 194.00µs + signing_step::sign_produced_cids: 162.00µs + verification_step::verify: 39.00µs verify: 12.00µs - parser_10000_100 (29.93ms; 57.688 MiB, 57.688 MiB): Running very long AIR script with lot of variables and assignments - air::runner::execute_air: 29.93ms - preparation_step::preparation::parse_data: 20.00µs - preparation_step::preparation::prepare: 28.24ms - air::preparation_step::preparation::make_exec_ctx: 18.00µs - air_parser::parser::air_parser::parse: 27.98ms - runner::execute: 30.00µs + parser_10000_100 (30.20ms; 57.688 MiB, 57.688 MiB): Running very long AIR script with lot of variables and assignments + air::runner::execute_air: 30.20ms + preparation_step::preparation::parse_data: 16.00µs + preparation_step::preparation::prepare: 28.48ms + air::preparation_step::preparation::make_exec_ctx: 17.00µs + air_parser::parser::air_parser::parse: 28.28ms + runner::execute: 31.00µs runner::farewell: 258.00µs from_success_result: 236.00µs - populate_outcome_from_contexts: 196.00µs + populate_outcome_from_contexts: 194.00µs signing_step::sign_produced_cids: 160.00µs verification_step::verify: 36.00µs verify: 11.00µs diff --git a/junk/cidify/Cargo.toml b/junk/cidify/Cargo.toml deleted file mode 100644 index 9f24bd2536..0000000000 --- a/junk/cidify/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "cidify" -version = "0.1.0" -edition = "2021" -publish = false - -[dependencies] -aquavm-air = { path = "../../air", features = ["gen_signatures", "check_signatures"] } -air-interpreter-cid = { path = "../../crates/air-lib/interpreter-cid" } -air-interpreter-data = { path = "../../crates/air-lib/interpreter-data" } -air-interpreter-signatures = { path = "../../crates/air-lib/interpreter-signatures" } -air-test-utils = { path = "../../crates/air-lib/test-utils" } -clap = { version = "4.1.13", features = ["derive"] } -serde = { version = "1.0.158", features = ["derive"] } -serde_json = "1.0.94" diff --git a/junk/gen-bench-data/Cargo.toml b/junk/gen-bench-data/Cargo.toml index f59456992b..0ca5904354 100644 --- a/junk/gen-bench-data/Cargo.toml +++ b/junk/gen-bench-data/Cargo.toml @@ -7,6 +7,8 @@ edition = "2021" [dependencies] aquavm-air = { path = "../../air", features = ["gen_signatures", "check_signatures"] } +air-interpreter-cid = { path = "../../crates/air-lib/interpreter-cid" } +air-interpreter-data = { path = "../../crates/air-lib/interpreter-data" } air-interpreter-signatures = { path = "../../crates/air-lib/interpreter-signatures" } air-test-utils = { path = "../../crates/air-lib/test-utils" } air-testing-framework = { path = "../../crates/testing-framework" } diff --git a/junk/gen-bench-data/gen_benchmark_data.sh b/junk/gen-bench-data/gen_benchmark_data.sh index 0a37602ade..28ba2b4db6 100755 --- a/junk/gen-bench-data/gen_benchmark_data.sh +++ b/junk/gen-bench-data/gen_benchmark_data.sh @@ -8,13 +8,22 @@ echo "Pre-build a binary..." >&2 cargo build --quiet --release for bench in multiple-cids10 \ - multiple-peers8 \ - multiple-sigs30 \ - dashboard network-explore; do + multiple-peers8 \ + multiple-sigs30 \ + big-values-data \ + canon-map-key-by-lens \ + canon-map-key-element-by-lens \ + canon-map-multiple-keys \ + canon-map-single-key \ + canon-map-scalar-multiple-keys \ + canon-map-scalar-single-key \ + dashboard \ + network-explore \ + long-data \ + populate-map-multiple-keys \ + populate-map-single-key ; +do echo "Generating ${bench} ..." >&2 - if [ "${bench}" == multiple-peers25 ]; then - echo "WARNING: this bench data generation can take more than 10 minutes..." >&2 - fi DESTDIR="../../benches/performance_metering/${bench}/" mkdir -p "${DESTDIR}" time cargo run --quiet --release -- --dest-dir "${DESTDIR}" "${bench}" diff --git a/junk/gen-bench-data/src/canon_map_key_by_lens.air.tmpl b/junk/gen-bench-data/src/canon_map_key_by_lens.air.tmpl new file mode 100644 index 0000000000..fde630762c --- /dev/null +++ b/junk/gen-bench-data/src/canon_map_key_by_lens.air.tmpl @@ -0,0 +1,20 @@ +(new %map + (seq + (seq + (call "init_peer_id" ("" "init") [] data) ; ok = [{data}] + (fold data value + (seq + (ap ("some-lengthy-and-scary-key" value) %map) + (next value) + ) + ) + ) + (seq + (canon "init_peer_id" %map #%canon) + (seq + (canon "other_peer_id" $unused_stream #$node_change) + (ap #%canon.$.some-lengthy-and-scary-key scalar) + ) + ) + ) +) diff --git a/junk/gen-bench-data/src/canon_map_key_element_by_lens.air.tmpl b/junk/gen-bench-data/src/canon_map_key_element_by_lens.air.tmpl new file mode 100644 index 0000000000..3e63cfcd36 --- /dev/null +++ b/junk/gen-bench-data/src/canon_map_key_element_by_lens.air.tmpl @@ -0,0 +1,20 @@ +(new %map + (seq + (seq + (call "init_peer_id" ("" "init") [] data) ; ok = [{data}] + (fold data value + (seq + (ap ("some-lengthy-and-scary-key" value) %map) + (next value) + ) + ) + ) + (seq + (canon "init_peer_id" %map #%canon) + (seq + (canon "other_peer_id" $unused_stream #$node_change) + (ap #%canon.$.some-lengthy-and-scary-key.[{idx}] scalar) + ) + ) + ) +) diff --git a/junk/gen-bench-data/src/canon_map_multiple_keys.air.tmpl b/junk/gen-bench-data/src/canon_map_multiple_keys.air.tmpl new file mode 100644 index 0000000000..b57b7857f0 --- /dev/null +++ b/junk/gen-bench-data/src/canon_map_multiple_keys.air.tmpl @@ -0,0 +1,19 @@ +(new %map + (seq + (seq + (call "init_peer_id" ("" "init") [] data) ; ok = [{data}] + (fold data key + (seq + (fold data value + (seq + (ap (key value) %map) + (next value) + ) + ) + (next key) + ) + ) + ) + (canon "other_peer_id" %map #%canon) + ) +) diff --git a/junk/gen-bench-data/src/canon_map_scalar_multiple_keys.air.tmpl b/junk/gen-bench-data/src/canon_map_scalar_multiple_keys.air.tmpl new file mode 100644 index 0000000000..993f9b39d7 --- /dev/null +++ b/junk/gen-bench-data/src/canon_map_scalar_multiple_keys.air.tmpl @@ -0,0 +1,19 @@ +(new %map + (seq + (seq + (call "init_peer_id" ("" "init") [] data) ; ok = [{data}] + (fold data key + (seq + (fold data value + (seq + (ap (key value) %map) + (next value) + ) + ) + (next key) + ) + ) + ) + (canon "other_peer_id" %map scalar) + ) +) diff --git a/junk/gen-bench-data/src/canon_map_scalar_single_key.air.tmpl b/junk/gen-bench-data/src/canon_map_scalar_single_key.air.tmpl new file mode 100644 index 0000000000..1174594fff --- /dev/null +++ b/junk/gen-bench-data/src/canon_map_scalar_single_key.air.tmpl @@ -0,0 +1,14 @@ +(new %map + (seq + (seq + (call "init_peer_id" ("" "init") [] data) ; ok = [{data}] + (fold data value + (seq + (ap ("somesome-lengthy-and-scary-key" value) %map) + (next value) + ) + ) + ) + (canon "other_peer_id" %map scalar) + ) +) diff --git a/junk/gen-bench-data/src/canon_map_single_key.air.tmpl b/junk/gen-bench-data/src/canon_map_single_key.air.tmpl new file mode 100644 index 0000000000..957fa01e18 --- /dev/null +++ b/junk/gen-bench-data/src/canon_map_single_key.air.tmpl @@ -0,0 +1,14 @@ +(new %map + (seq + (seq + (call "init_peer_id" ("" "init") [] data) ; ok = [{data}] + (fold data value + (seq + (ap ("some-lengthy-and-scary-key" value) %map) + (next value) + ) + ) + ) + (canon "other_peer_id" %map #%canon) + ) +) diff --git a/junk/cidify/anomaly_big.json b/junk/gen-bench-data/src/cid_benchmarking/anomaly_big.json similarity index 100% rename from junk/cidify/anomaly_big.json rename to junk/gen-bench-data/src/cid_benchmarking/anomaly_big.json diff --git a/junk/cidify/anomaly_long.json b/junk/gen-bench-data/src/cid_benchmarking/anomaly_long.json similarity index 100% rename from junk/cidify/anomaly_long.json rename to junk/gen-bench-data/src/cid_benchmarking/anomaly_long.json diff --git a/junk/cidify/src/main.rs b/junk/gen-bench-data/src/cid_benchmarking/mod.rs similarity index 68% rename from junk/cidify/src/main.rs rename to junk/gen-bench-data/src/cid_benchmarking/mod.rs index 76ccd29301..c7746e536f 100644 --- a/junk/cidify/src/main.rs +++ b/junk/gen-bench-data/src/cid_benchmarking/mod.rs @@ -1,14 +1,17 @@ +use air::interpreter_version; use air_interpreter_data::ExecutedState; -use air_interpreter_signatures::{PeerCidTracker, SignatureStore}; +use air_interpreter_signatures::KeyPair; +use air_interpreter_signatures::PeerCidTracker; +use air_interpreter_signatures::SignatureStore; use air_test_utils::key_utils::derive_dummy_keypair; use air_test_utils::prelude::*; -use std::collections::HashMap; - -use clap::Parser; -use serde::{de::DeserializeOwned, Deserialize, Serialize}; -use serde_json::{json, Value}; -use std::path::PathBuf; +use serde::de::DeserializeOwned; +use serde::Deserialize; +use serde::Serialize; +use serde_json::json; +use serde_json::Value; +use std::collections::HashMap; #[derive(Deserialize, Debug, Serialize)] struct PreCidInterpeterData { @@ -51,60 +54,6 @@ enum Kind { Unused, } -#[derive(Parser)] -struct Args { - data_path: PathBuf, - calls_path: PathBuf, -} - -fn main() { - let args = Args::parse(); - let mut data: PreCidInterpeterData = read_data(args.data_path); - let calls: TraceCalls = read_data(args.calls_path); - let mut calls = calls.into_iter(); - // STUB - let (keypair, id) = derive_dummy_keypair("init_peer_id"); - let mut peer_id_cache = HashMap::::new(); - let mut signature_tracker = PeerCidTracker::new(id); - - let mut cid_state = air::ExecutionCidState::new(); - - for elt in &mut data.trace { - let obj = elt.as_object_mut().unwrap(); - if let Some(call) = obj.get_mut("call") { - if let Some(executed) = call.as_object_mut().unwrap().get_mut("executed") { - if let Some(scalar) = executed.as_object_mut().unwrap().get_mut("scalar") { - let call_info = calls.next().expect("More calls than call_info"); - let state = transform_cid( - scalar.take(), - call_info, - &mut cid_state, - &mut peer_id_cache, - &mut signature_tracker, - ); - *elt = json!(state); - } - } - } - } - - data.other_fields.as_object_mut().unwrap().insert( - "cid_info".to_owned(), - serde_json::to_value(Into::::into(cid_state)).unwrap(), - ); - data.other_fields - .as_object_mut() - .unwrap() - .insert("interpreter_version".to_owned(), json!("0.41.0")); - let mut ss = ::new(); - ss.put(keypair.public().into(), signature_tracker.gen_signature("particle_id", &keypair).unwrap()); - data.other_fields - .as_object_mut() - .unwrap() - .insert("signatures".to_owned(), json!(ss)); - serde_json::to_writer(std::io::stdout(), &data).unwrap(); -} - fn derive_peer_id(peer_name: &str, peer_id_cache: &mut HashMap) -> String { peer_id_cache .entry(peer_name.to_owned()) @@ -112,7 +61,7 @@ fn derive_peer_id(peer_name: &str, peer_id_cache: &mut HashMap) .clone() } -fn read_data(path: PathBuf) -> T { +fn read_data(path: &str) -> T { let inp = std::fs::File::open(path).unwrap(); serde_json::from_reader(inp).unwrap() } @@ -142,7 +91,6 @@ fn transform_cid( builder = builder.json_path(json_path); } - match meta.kind { Some(Kind::Scalar) | None => { let state = builder.scalar_tracked(cid_state); @@ -154,3 +102,87 @@ fn transform_cid( Some(Kind::Stream) => unimplemented!("no stream in test data"), } } + +pub fn cid_benchmarking_data( + curr_data_filename: &str, + keypair: &KeyPair, + peer_id: String, + particle_id: &str, +) -> Vec { + let mut curr_data: PreCidInterpeterData = read_data(curr_data_filename); + let calls: TraceCalls = read_data("src/cid_benchmarking/simple-calls-info.json"); + let mut calls = calls.into_iter(); + // STUB + let mut peer_id_cache = HashMap::::new(); + let mut signature_tracker = PeerCidTracker::new(peer_id); + + let mut cid_state = air::ExecutionCidState::new(); + + for elt in &mut curr_data.trace { + let obj = elt.as_object_mut().unwrap(); + if let Some(call) = obj.get_mut("call") { + if let Some(executed) = call.as_object_mut().unwrap().get_mut("executed") { + if let Some(scalar) = executed.as_object_mut().unwrap().get_mut("scalar") { + let call_info = calls.next().expect("More calls than call_info"); + let state = transform_cid( + scalar.take(), + call_info, + &mut cid_state, + &mut peer_id_cache, + &mut signature_tracker, + ); + *elt = json!(state); + } + } + } + } + + curr_data.other_fields.as_object_mut().unwrap().insert( + "cid_info".to_owned(), + serde_json::to_value(Into::::into(cid_state)).unwrap(), + ); + curr_data.other_fields.as_object_mut().unwrap().insert( + "interpreter_version".to_owned(), + json!(interpreter_version()), + ); + let mut ss = ::new(); + ss.put( + keypair.public(), + signature_tracker + .gen_signature(particle_id, keypair) + .unwrap(), + ); + curr_data + .other_fields + .as_object_mut() + .unwrap() + .insert("signatures".to_owned(), json!(ss)); + + serde_json::to_vec(&curr_data).unwrap() +} + +pub fn cid_benchmarking_long_data( + keypair: &KeyPair, + peer_id: String, + particle_id: &str, +) -> Vec { + cid_benchmarking_data( + "src/cid_benchmarking/anomaly_long.json", + keypair, + peer_id, + particle_id, + ) +} + +pub fn cid_benchmarking_big_values_data( + keypair: &KeyPair, + peer_id: String, + particle_id: &str, +) -> Vec { + cid_benchmarking_data( + "src/cid_benchmarking/anomaly_big.json", + keypair, + peer_id, + particle_id, + ) +} diff --git a/junk/cidify/simple-calls-info.json b/junk/gen-bench-data/src/cid_benchmarking/simple-calls-info.json similarity index 100% rename from junk/cidify/simple-calls-info.json rename to junk/gen-bench-data/src/cid_benchmarking/simple-calls-info.json diff --git a/junk/gen-bench-data/src/dashboard.rs b/junk/gen-bench-data/src/dashboard.rs index 1a8d0bd673..c85d1f43c0 100644 --- a/junk/gen-bench-data/src/dashboard.rs +++ b/junk/gen-bench-data/src/dashboard.rs @@ -16,9 +16,9 @@ use super::Data; -use air_test_utils::prelude::*; -use air_test_utils::key_utils::derive_dummy_keypair; use air_interpreter_signatures::KeyPair; +use air_test_utils::key_utils::derive_dummy_keypair; +use air_test_utils::prelude::*; use maplit::hashmap; use std::cell::RefCell; @@ -26,7 +26,9 @@ use std::collections::HashSet; use std::rc::Rc; fn create_peers() -> Vec<(KeyPair, String)> { - (0..7).map(|n| derive_dummy_keypair(&format!("n{n}"))).collect() + (0..7) + .map(|n| derive_dummy_keypair(&format!("n{n}"))) + .collect() } fn into_hashset(peers: Vec) -> HashSet { @@ -184,7 +186,8 @@ pub(crate) fn dashboard() -> super::Data { }) .collect::>(); - let test_params = TestRunParameters::from_init_peer_id(client_id.clone()).with_particle_id(super::PARTICLE_ID); + let test_params = TestRunParameters::from_init_peer_id(client_id.clone()) + .with_particle_id(super::PARTICLE_ID); // -> client 1 let client_1_result = checked_call_vm!(client, test_params.clone(), script, "", ""); @@ -378,6 +381,6 @@ pub(crate) fn dashboard() -> super::Data { "init-peer-id".to_owned() => client_id, }, call_results: None, - keypair: bs58::encode(relay_key.to_vec()).into_string(), + keypair: bs58::encode(relay_key.as_inner().to_vec()).into_string(), } } diff --git a/junk/gen-bench-data/src/data.rs b/junk/gen-bench-data/src/data.rs new file mode 100644 index 0000000000..5b760cd5dc --- /dev/null +++ b/junk/gen-bench-data/src/data.rs @@ -0,0 +1,12 @@ +use std::collections::HashMap; + +#[derive(Debug, Default)] +#[allow(dead_code)] +pub(crate) struct Data { + pub(crate) air: String, + pub(crate) prev_data: Vec, + pub(crate) cur_data: Vec, + pub(crate) params_json: HashMap, + pub(crate) call_results: Option, + pub(crate) keypair: String, +} diff --git a/junk/gen-bench-data/src/main.rs b/junk/gen-bench-data/src/main.rs index 4970f7c36c..86bb73ba79 100644 --- a/junk/gen-bench-data/src/main.rs +++ b/junk/gen-bench-data/src/main.rs @@ -1,15 +1,22 @@ use air_test_framework::*; +use air_test_utils::key_utils::derive_dummy_keypair; use air_test_utils::prelude::*; -use clap::{Parser, Subcommand}; + +use clap::Parser; +use clap::Subcommand; use itertools::Itertools as _; use maplit::hashmap; - +use serde::Serialize; use std::collections::HashMap; -use std::path::{Path, PathBuf}; +use std::path::Path; +use std::path::PathBuf; const PARTICLE_ID: &str = "0123456789ABCDEF"; +const MAX_STREAM_SIZE: usize = 1023; +mod cid_benchmarking; mod dashboard; +mod data; mod network_explore; #[derive(Debug, Parser)] @@ -23,6 +30,7 @@ struct Cli { #[derive(Debug, Subcommand)] enum Bench { + Dashboard, MultipleCids10, MultipleCids50, MultiplePeers5, @@ -31,8 +39,17 @@ enum Bench { MultipleSigs10, MultipleSigs30, MultipleSigs200, - Dashboard, NetworkExplore, + CanonMapKeyByLens, + CanonMapKeyElementByLens, + PopulateMapMultipleKeys, + PopulateMapSingleKey, + CanonMapMultipleKeys, + CanonMapSingleKey, + CanonMapScalarMultipleKeys, + CanonMapScalarSingleKey, + LongData, + BigValuesData, } fn main() { @@ -49,6 +66,16 @@ fn main() { Bench::MultipleSigs200 => multiple_sigs(200), Bench::Dashboard => dashboard::dashboard(), Bench::NetworkExplore => network_explore::network_explore(), + Bench::PopulateMapMultipleKeys => populate_map_multiple_keys(MAX_STREAM_SIZE), + Bench::PopulateMapSingleKey => populate_map_single_key(770), + Bench::CanonMapMultipleKeys => canon_map_multiple_keys(MAX_STREAM_SIZE), + Bench::CanonMapSingleKey => canon_map_single_key(770), + Bench::CanonMapScalarMultipleKeys => canon_map_scalar_multiple_keys(MAX_STREAM_SIZE), + Bench::CanonMapScalarSingleKey => canon_map_scalar_single_key(770), + Bench::CanonMapKeyByLens => canon_map_key_by_lens(770), + Bench::CanonMapKeyElementByLens => canon_map_key_element_by_lens(770), + Bench::LongData => long_data(), + Bench::BigValuesData => big_values_data(), }; save_data(&args.dest_dir, data).unwrap(); @@ -59,28 +86,46 @@ fn save_data(dest_dir: &Path, data: Data) -> Result<(), Box Vec { - use serde::ser::Serialize; +fn reformat_json_if_possible(data: &[u8]) -> Option> { + if data.is_empty() { + return None; + } let obj: serde_json::Value = serde_json::from_slice(data).unwrap(); let fmt = serde_json::ser::PrettyFormatter::with_indent(&[]); let mut out = vec![]; let mut ser = serde_json::ser::Serializer::with_formatter(&mut out, fmt); obj.serialize(&mut ser).unwrap(); - out + Some(out) } -fn save_file(dest_dir: &Path, filename: &str, data: impl AsRef<[u8]>) -> Result<(), Box>{ +fn save_file( + dest_dir: &Path, + filename: &str, + data: Option>, +) -> Result<(), Box> { use std::fs::*; use std::io::prelude::*; @@ -88,12 +133,15 @@ fn save_file(dest_dir: &Path, filename: &str, data: impl AsRef<[u8]>) -> Result< dest_dir.push(filename); let mut f = File::create(&dest_dir)?; - f.write_all(data.as_ref())?; + if let Some(data) = data { + f.write_all(data.as_ref())?; + } Ok(()) } #[derive(Debug, Default)] +#[allow(dead_code)] pub(crate) struct Data { pub(crate) air: String, pub(crate) prev_data: Vec, @@ -104,7 +152,7 @@ pub(crate) struct Data { } fn multiple_cids(size: usize) -> Data { - let data = (0..size).map(|n| format!(r#""val{}""#, n)).join(","); + let data: String = (0..size).map(|n| format!(r#""val{}""#, n)).join(","); let air_script = format!(include_str!("multiple_cids.air.tmpl"), data = data); let exec = AirScriptExecutor::::new( @@ -112,7 +160,8 @@ fn multiple_cids(size: usize) -> Data { vec![], vec![], &air_script, - ).unwrap(); + ) + .unwrap(); let prev_res = exec.execute_one("init_peer_id").unwrap(); let cur_res = exec.execute_one("other_peer_id").unwrap(); @@ -155,7 +204,8 @@ fn multiple_peers(size: usize) -> Data { vec![], peers.clone(), &air_script, - ).unwrap(); + ) + .unwrap(); let prev_res = exec.execute_one("init_peer_id").unwrap(); @@ -200,7 +250,8 @@ fn multiple_sigs(size: usize) -> Data { vec![], vec![], &air_script, - ).unwrap(); + ) + .unwrap(); let prev_res = exec.execute_one("init_peer_id").unwrap(); let cur_res = exec.execute_one("other_peer_id").unwrap(); @@ -232,3 +283,397 @@ fn multiple_sigs(size: usize) -> Data { keypair: bs58::encode(keypair.to_vec()).into_string(), } } + +fn canon_map_key_by_lens(size: usize) -> Data { + let data: String = (0..size).map(|n| format!(r#""val{}""#, n)).join(","); + let air_script = format!(include_str!("canon_map_key_by_lens.air.tmpl"), data = data); + + let exec = AirScriptExecutor::::new( + TestRunParameters::from_init_peer_id("init_peer_id").with_particle_id(PARTICLE_ID), + vec![], + vec![], + &air_script, + ) + .unwrap(); + + let prev_res = exec.execute_one("init_peer_id").unwrap(); + + let keypair = exec + .get_network() + .get_named_peer_env("other_peer_id") + .expect("main peer") + .borrow() + .get_peer() + .get_keypair() + .clone(); + + let peer_id: String = exec.resolve_name("other_peer_id").to_string(); + let init_peer_id: String = exec.resolve_name("init_peer_id").to_string(); + + Data { + air: exec.get_transformed_air_script().to_string(), + prev_data: vec![], + cur_data: prev_res.data, + params_json: hashmap! { + "comment".to_owned() => "benchmarking a map insert operation".to_owned(), + "particle-id".to_owned() => PARTICLE_ID.to_owned(), + "current-peer-id".to_owned() => peer_id.clone(), + "init-peer-id".to_owned() => init_peer_id, + }, + call_results: None, + keypair: bs58::encode(keypair.to_vec()).into_string(), + } +} + +fn canon_map_key_element_by_lens(size: usize) -> Data { + let data: String = (0..size).map(|n| format!(r#""val{}""#, n)).join(","); + let air_script = format!( + include_str!("canon_map_key_element_by_lens.air.tmpl"), + data = data, + idx = size - 1 + ); + + let exec = AirScriptExecutor::::new( + TestRunParameters::from_init_peer_id("init_peer_id").with_particle_id(PARTICLE_ID), + vec![], + vec![], + &air_script, + ) + .unwrap(); + + let prev_res = exec.execute_one("init_peer_id").unwrap(); + + let keypair = exec + .get_network() + .get_named_peer_env("other_peer_id") + .expect("main peer") + .borrow() + .get_peer() + .get_keypair() + .clone(); + + let peer_id: String = exec.resolve_name("other_peer_id").to_string(); + let init_peer_id: String = exec.resolve_name("init_peer_id").to_string(); + + Data { + air: exec.get_transformed_air_script().to_string(), + prev_data: vec![], + cur_data: prev_res.data, + params_json: hashmap! { + "comment".to_owned() => "benchmarking a map insert operation".to_owned(), + "particle-id".to_owned() => PARTICLE_ID.to_owned(), + "current-peer-id".to_owned() => peer_id.clone(), + "init-peer-id".to_owned() => init_peer_id, + }, + call_results: None, + keypair: bs58::encode(keypair.to_vec()).into_string(), + } +} + +fn populate_map_multiple_keys(size: usize) -> Data { + let sq_root = (size as f64).sqrt() as usize; + let data: String = (0..sq_root).map(|n| format!(r#""val{}""#, n)).join(","); + let air_script = format!( + include_str!("populate_map_multiple_keys.air.tmpl"), + data = data + ); + + let exec = AirScriptExecutor::::new( + TestRunParameters::from_init_peer_id("init_peer_id").with_particle_id(PARTICLE_ID), + vec![], + vec![], + &air_script, + ) + .unwrap(); + + let prev_res = exec.execute_one("init_peer_id").unwrap(); + + let keypair = exec + .get_network() + .get_named_peer_env("other_peer_id") + .expect("main peer") + .borrow() + .get_peer() + .get_keypair() + .clone(); + + let peer_id: String = exec.resolve_name("other_peer_id").to_string(); + let init_peer_id: String = exec.resolve_name("init_peer_id").to_string(); + + Data { + air: exec.get_transformed_air_script().to_string(), + prev_data: vec![], + cur_data: prev_res.data, + params_json: hashmap! { + "comment".to_owned() => "benchmarking a map insert operation".to_owned(), + "particle-id".to_owned() => PARTICLE_ID.to_owned(), + "current-peer-id".to_owned() => peer_id.clone(), + "init-peer-id".to_owned() => init_peer_id, + }, + call_results: None, + keypair: bs58::encode(keypair.to_vec()).into_string(), + } +} + +fn populate_map_single_key(size: usize) -> Data { + let data: String = (0..size).map(|n| format!(r#""val{}""#, n)).join(","); + let air_script = format!( + include_str!("populate_map_single_key.air.tmpl"), + data = data + ); + + let exec = AirScriptExecutor::::new( + TestRunParameters::from_init_peer_id("init_peer_id").with_particle_id(PARTICLE_ID), + vec![], + vec![], + &air_script, + ) + .unwrap(); + + let prev_res = exec.execute_one("init_peer_id").unwrap(); + + let keypair = exec + .get_network() + .get_named_peer_env("other_peer_id") + .expect("main peer") + .borrow() + .get_peer() + .get_keypair() + .clone(); + + let peer_id: String = exec.resolve_name("other_peer_id").to_string(); + let init_peer_id: String = exec.resolve_name("init_peer_id").to_string(); + + Data { + air: exec.get_transformed_air_script().to_string(), + prev_data: vec![], + cur_data: prev_res.data, + params_json: hashmap! { + "comment".to_owned() => "benchmarking a map insert operation".to_owned(), + "particle-id".to_owned() => PARTICLE_ID.to_owned(), + "current-peer-id".to_owned() => peer_id.clone(), + "init-peer-id".to_owned() => init_peer_id, + }, + call_results: None, + keypair: bs58::encode(keypair.to_vec()).into_string(), + } +} + +fn canon_map_multiple_keys(size: usize) -> Data { + let sq_root = (size as f64).sqrt() as usize; + let data: String = (0..sq_root).map(|n| format!(r#""val{}""#, n)).join(","); + let air_script = format!( + include_str!("canon_map_multiple_keys.air.tmpl"), + data = data + ); + + let exec = AirScriptExecutor::::new( + TestRunParameters::from_init_peer_id("init_peer_id").with_particle_id(PARTICLE_ID), + vec![], + vec![], + &air_script, + ) + .unwrap(); + + let prev_res = exec.execute_one("init_peer_id").unwrap(); + + let keypair = exec + .get_network() + .get_named_peer_env("other_peer_id") + .expect("main peer") + .borrow() + .get_peer() + .get_keypair() + .clone(); + + let peer_id: String = exec.resolve_name("other_peer_id").to_string(); + let init_peer_id: String = exec.resolve_name("init_peer_id").to_string(); + + Data { + air: exec.get_transformed_air_script().to_string(), + prev_data: vec![], + cur_data: prev_res.data, + params_json: hashmap! { + "comment".to_owned() => "benchmarking a map insert operation".to_owned(), + "particle-id".to_owned() => PARTICLE_ID.to_owned(), + "current-peer-id".to_owned() => peer_id.clone(), + "init-peer-id".to_owned() => init_peer_id, + }, + call_results: None, + keypair: bs58::encode(keypair.to_vec()).into_string(), + } +} + +fn canon_map_single_key(size: usize) -> Data { + let data: String = (0..size).map(|n| format!(r#""val{}""#, n)).join(","); + let air_script = format!(include_str!("canon_map_single_key.air.tmpl"), data = data); + + let exec = AirScriptExecutor::::new( + TestRunParameters::from_init_peer_id("init_peer_id").with_particle_id(PARTICLE_ID), + vec![], + vec![], + &air_script, + ) + .unwrap(); + + let prev_res = exec.execute_one("init_peer_id").unwrap(); + + let keypair = exec + .get_network() + .get_named_peer_env("other_peer_id") + .expect("main peer") + .borrow() + .get_peer() + .get_keypair() + .clone(); + + let peer_id: String = exec.resolve_name("other_peer_id").to_string(); + let init_peer_id: String = exec.resolve_name("init_peer_id").to_string(); + + Data { + air: exec.get_transformed_air_script().to_string(), + prev_data: vec![], + cur_data: prev_res.data, + params_json: hashmap! { + "comment".to_owned() => "benchmarking a map insert operation".to_owned(), + "particle-id".to_owned() => PARTICLE_ID.to_owned(), + "current-peer-id".to_owned() => peer_id.clone(), + "init-peer-id".to_owned() => init_peer_id, + }, + call_results: None, + keypair: bs58::encode(keypair.to_vec()).into_string(), + } +} + +fn canon_map_scalar_multiple_keys(size: usize) -> Data { + let sq_root = (size as f64).sqrt() as usize; + let data: String = (0..sq_root).map(|n| format!(r#""val{}""#, n)).join(","); + let air_script = format!( + include_str!("canon_map_scalar_multiple_keys.air.tmpl"), + data = data + ); + + let exec = AirScriptExecutor::::new( + TestRunParameters::from_init_peer_id("init_peer_id").with_particle_id(PARTICLE_ID), + vec![], + vec![], + &air_script, + ) + .unwrap(); + + let prev_res = exec.execute_one("init_peer_id").unwrap(); + + let keypair = exec + .get_network() + .get_named_peer_env("other_peer_id") + .expect("main peer") + .borrow() + .get_peer() + .get_keypair() + .clone(); + + let peer_id: String = exec.resolve_name("other_peer_id").to_string(); + let init_peer_id: String = exec.resolve_name("init_peer_id").to_string(); + + Data { + air: exec.get_transformed_air_script().to_string(), + prev_data: vec![], + cur_data: prev_res.data, + params_json: hashmap! { + "comment".to_owned() => "benchmarking a map insert operation".to_owned(), + "particle-id".to_owned() => PARTICLE_ID.to_owned(), + "current-peer-id".to_owned() => peer_id.clone(), + "init-peer-id".to_owned() => init_peer_id, + }, + call_results: None, + keypair: bs58::encode(keypair.to_vec()).into_string(), + } +} + +fn canon_map_scalar_single_key(size: usize) -> Data { + let data: String = (0..size).map(|n| format!(r#""val{}""#, n)).join(","); + let air_script = format!( + include_str!("canon_map_scalar_single_key.air.tmpl"), + data = data + ); + + let exec = AirScriptExecutor::::new( + TestRunParameters::from_init_peer_id("init_peer_id").with_particle_id(PARTICLE_ID), + vec![], + vec![], + &air_script, + ) + .unwrap(); + + let prev_res = exec.execute_one("init_peer_id").unwrap(); + + let keypair = exec + .get_network() + .get_named_peer_env("other_peer_id") + .expect("main peer") + .borrow() + .get_peer() + .get_keypair() + .clone(); + + let peer_id: String = exec.resolve_name("other_peer_id").to_string(); + let init_peer_id: String = exec.resolve_name("init_peer_id").to_string(); + + Data { + air: exec.get_transformed_air_script().to_string(), + prev_data: vec![], + cur_data: prev_res.data, + params_json: hashmap! { + "comment".to_owned() => "benchmarking a map insert operation".to_owned(), + "particle-id".to_owned() => PARTICLE_ID.to_owned(), + "current-peer-id".to_owned() => peer_id.clone(), + "init-peer-id".to_owned() => init_peer_id, + }, + call_results: None, + keypair: bs58::encode(keypair.to_vec()).into_string(), + } +} + +fn long_data() -> Data { + use cid_benchmarking::cid_benchmarking_long_data; + + let (keypair, peer_id) = derive_dummy_keypair("init_peer_id"); + let particle_id = "particle_id"; + let cur_data = cid_benchmarking_long_data(&keypair, peer_id.clone(), particle_id); + + Data { + air: "(null)".to_owned(), + prev_data: vec![], + cur_data, + params_json: hashmap! { + "comment".to_owned() => "Long data trace".to_owned(), + "particle-id".to_owned() => particle_id.to_owned(), + "current-peer-id".to_owned() => peer_id.clone(), + "init-peer-id".to_owned() => peer_id, + }, + call_results: None, + keypair: bs58::encode(keypair.as_inner().to_vec()).into_string(), + } +} + +fn big_values_data() -> Data { + use cid_benchmarking::cid_benchmarking_big_values_data; + + let (keypair, peer_id) = derive_dummy_keypair("init_peer_id"); + let particle_id = "particle_id"; + let cur_data = cid_benchmarking_big_values_data(&keypair, peer_id.clone(), particle_id); + + Data { + air: "(null)".to_owned(), + prev_data: vec![], + cur_data, + params_json: hashmap! { + "comment".to_owned() => "Loading a trace with huge values".to_owned(), + "particle-id".to_owned() => particle_id.to_owned(), + "current-peer-id".to_owned() => peer_id.clone(), + "init-peer-id".to_owned() => peer_id, + }, + call_results: None, + keypair: bs58::encode(keypair.as_inner().to_vec()).into_string(), + } +} diff --git a/junk/gen-bench-data/src/network_explore.rs b/junk/gen-bench-data/src/network_explore.rs index bc5a52bd6f..110bcbb353 100644 --- a/junk/gen-bench-data/src/network_explore.rs +++ b/junk/gen-bench-data/src/network_explore.rs @@ -176,6 +176,6 @@ pub(crate) fn network_explore() -> Data { "init-peer-id".to_owned() => "".to_owned(), }, call_results: None, - keypair: bs58::encode(relay_key.to_vec()).into_string(), + keypair: bs58::encode(relay_key.as_inner().to_vec()).into_string(), } } diff --git a/junk/gen-bench-data/src/populate_map_multiple_keys.air.tmpl b/junk/gen-bench-data/src/populate_map_multiple_keys.air.tmpl new file mode 100644 index 0000000000..04b1acdaa3 --- /dev/null +++ b/junk/gen-bench-data/src/populate_map_multiple_keys.air.tmpl @@ -0,0 +1,22 @@ +(new %map + (seq + (seq + (call "init_peer_id" ("" "init") [] data) ; ok = [{data}] + (seq + (canon "other_peer_id" %map #%switch_node1) + (fold data key + (seq + (fold data value + (seq + (ap (key value) %map) + (next value) + ) + ) + (next key) + ) + ) + ) + ) + (call "init_peer_id" ("" "complete") []) + ) +) diff --git a/junk/gen-bench-data/src/populate_map_single_key.air.tmpl b/junk/gen-bench-data/src/populate_map_single_key.air.tmpl new file mode 100644 index 0000000000..dcfa914655 --- /dev/null +++ b/junk/gen-bench-data/src/populate_map_single_key.air.tmpl @@ -0,0 +1,17 @@ +(new %map + (seq + (seq + (call "init_peer_id" ("" "init") [] data) ; ok = [{data}] + (seq + (canon "other_peer_id" %map #%switch_node1) + (fold data value + (seq + (ap ("some-lengthy-and-scary-key" value) %map) + (next value) + ) + ) + ) + ) + (call "init_peer_id" ("" "complete") []) + ) +)