This commit is contained in:
Roman Nozdrin 2023-10-31 13:59:17 +00:00
parent de53441fa4
commit 60592ae6ee
9 changed files with 5769 additions and 828 deletions

1204
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -84,3 +84,6 @@ harness = false
[[bench]]
name = "data_long_benchmark"
harness = false
[patch.crates-io]
fluence-app-service = { version = "0.29.0", git = "https://github.com/fluencelabs/marine", branch = "feat/it-with-error-propagation"}

View File

@ -31,3 +31,9 @@ log = "0.4.17"
parking_lot = "0.12.1"
tracing = "0.1.37"
fluence-keypair = { version = "0.10.3", default-features = false }
[patch.crates-io]
marine-runtime = { version = "0.30.0", git = "https://github.com/fluencelabs/marine", branch = "feat/it-with-error-propagation"}
wasmer-it = { version = "0.26.1", package = "wasmer-interface-types-fl", branch = "feat/error-propagation", git = "https://github.com/fluencelabs/interface-types" }
it-lilo = { version = "0.5.1", branch = "feat/error-propagation", git = "https://github.com/fluencelabs/interface-types" }
it-memory-traits = { version = "0.4.0", branch = "feat/error-propagation", git = "https://github.com/fluencelabs/interface-types" }

View File

@ -149,17 +149,31 @@ impl AVMRunner {
args.push(IValue::String(tracing_params));
args.push(IValue::U8(tracing_output_mode));
let result = measure!(
self.marine.call_with_ivalues(
&self.wasm_filename,
"invoke_tracing",
&args,
<_>::default(),
)?,
tracing::Level::INFO,
"marine.call_with_ivalues",
method = "invoke_tracing",
// let result = measure!(
// self.marine.call_with_ivalues(
// &self.wasm_filename,
// "invoke_tracing",
// &args,
// <_>::default(),
// )?,
// tracing::Level::INFO,
// "marine.call_with_ivalues",
// method = "invoke_tracing",
// );
let result = self.marine.call_with_ivalues(
&self.wasm_filename,
"invoke_tracing",
&args,
<_>::default(),
);
println!("!!!!!!!!!!!!!###################result: {:?}", result);
if let Err(e) = result {
println!("Marine error: {}", e);
return Err(RunnerError::MarineError(e));
}
let result = result.unwrap();
// let result: Vec<IValue> =
let result = try_as_one_value_vec(result)?;
let outcome = InterpreterOutcome::from_ivalue(result)

File diff suppressed because it is too large Load Diff

View File

@ -327,157 +327,233 @@ Machine 62dabcde478dc58760ebbe71ef6047299144a5f63990c6c3d826ebf30175adfc:
execute: 42.00µs
new: 42.00µs
Machine 88756ca30bfb93b0da6a64252adc98fc3e97e142c3b4970af3d2948fd66107b4:
Platform: Linux-6.5.3-arch1-1-x86_64-with-glibc2.35
Timestamp: 2023-10-25 14:44:11.396894+00:00
Platform: Linux-6.5.9-arch2-1-x86_64-with-glibc2.35
Timestamp: 2023-10-27 13:22:10.364926+00:00
AquaVM version: 0.53.0
Benches:
Features:
canon-map-key-by-lens (11.70ms; 55.625 MiB, 55.625 MiB): benchmarking a map insert operation
air::runner::execute_air: 11.70ms
preparation_step::preparation::parse_data: 4.17ms
from_slice: 4.11ms
preparation_step::preparation::prepare: 707.00µs
air::preparation_step::preparation::make_exec_ctx: 420.00µs
air_parser::parser::air_parser::parse: 60.00µs
runner::execute: 3.21ms
runner::farewell: 3.47ms
from_success_result: 3.44ms
populate_outcome_from_contexts: 2.96ms
signing_step::sign_produced_cids: 10.00µs
verification_step::verify: 10.00µs
canon-map-key-element-by-lens (11.00ms; 55.625 MiB, 55.625 MiB): benchmarking a map insert operation
air::runner::execute_air: 11.00ms
preparation_step::preparation::parse_data: 4.14ms
from_slice: 4.09ms
preparation_step::preparation::prepare: 613.00µs
air::preparation_step::preparation::make_exec_ctx: 347.00µs
air_parser::parser::air_parser::parse: 56.00µs
runner::execute: 2.86ms
runner::farewell: 3.28ms
from_success_result: 3.25ms
populate_outcome_from_contexts: 2.86ms
signing_step::sign_produced_cids: 10.00µs
canon-map-key-by-lens (39.70ms; 55.625 MiB, 55.625 MiB): benchmarking a map insert operation
air::runner::execute_air: 39.70ms
preparation_step::preparation::parse_data: 4.07ms
from_slice: 4.03ms
preparation_step::preparation::prepare: 611.00µs
air::preparation_step::preparation::make_exec_ctx: 346.00µs
air_parser::parser::air_parser::parse: 54.00µs
runner::execute: 31.70ms
ap::execute: 50.00µs
ap_map::execute: 13.32ms
call::execute: 112.00µs
execute: 27.00µs
new: 18.00µs
canon::execute: 35.00µs
canon_map::execute: 690.00µs
runner::farewell: 3.20ms
from_success_result: 3.17ms
populate_outcome_from_contexts: 2.77ms
to_vec(call_results): 13.00µs
to_vec(data): 2.32ms
signing_step::sign_produced_cids: 9.00µs
verification_step::verify: 9.00µs
canon-map-multiple-keys (15.60ms; 53.500 MiB, 53.500 MiB): benchmarking a map insert operation
air::runner::execute_air: 15.60ms
preparation_step::preparation::parse_data: 351.00µs
from_slice: 308.00µs
preparation_step::preparation::prepare: 275.00µs
canon-map-key-element-by-lens (40.10ms; 55.625 MiB, 55.625 MiB): benchmarking a map insert operation
air::runner::execute_air: 40.10ms
preparation_step::preparation::parse_data: 4.04ms
from_slice: 4.00ms
preparation_step::preparation::prepare: 647.00µs
air::preparation_step::preparation::make_exec_ctx: 377.00µs
air_parser::parser::air_parser::parse: 58.00µs
runner::execute: 31.90ms
ap::execute: 29.00µs
ap_map::execute: 13.40ms
call::execute: 130.00µs
execute: 42.00µs
new: 17.00µs
canon::execute: 37.00µs
canon_map::execute: 782.00µs
runner::farewell: 3.29ms
from_success_result: 3.27ms
populate_outcome_from_contexts: 2.87ms
to_vec(call_results): 14.00µs
to_vec(data): 2.40ms
signing_step::sign_produced_cids: 9.00µs
verification_step::verify: 9.00µs
canon-map-multiple-keys (50.40ms; 53.500 MiB, 53.500 MiB): benchmarking a map insert operation
air::runner::execute_air: 50.40ms
preparation_step::preparation::parse_data: 345.00µs
from_slice: 306.00µs
preparation_step::preparation::prepare: 265.00µs
air::preparation_step::preparation::make_exec_ctx: 16.00µs
air_parser::parser::air_parser::parse: 46.00µs
runner::execute: 12.00ms
runner::farewell: 2.87ms
from_success_result: 2.84ms
populate_outcome_from_contexts: 2.46ms
signing_step::sign_produced_cids: 11.00µs
air_parser::parser::air_parser::parse: 43.00µs
runner::execute: 46.90ms
ap_map::execute: 17.57ms
call::execute: 102.00µs
execute: 27.00µs
new: 17.00µs
canon_map::execute: 8.32ms
runner::farewell: 2.72ms
from_success_result: 2.70ms
populate_outcome_from_contexts: 2.32ms
to_vec(call_results): 13.00µs
to_vec(data): 1.92ms
signing_step::sign_produced_cids: 9.00µs
verification_step::verify: 8.00µs
canon-map-scalar-multiple-keys (4.60ms; 52.125 MiB, 52.125 MiB): benchmarking a map insert operation
air::runner::execute_air: 4.60ms
preparation_step::preparation::parse_data: 346.00µs
from_slice: 304.00µs
preparation_step::preparation::prepare: 268.00µs
canon-map-scalar-multiple-keys (41.00ms; 52.125 MiB, 52.125 MiB): benchmarking a map insert operation
air::runner::execute_air: 41.00ms
preparation_step::preparation::parse_data: 348.00µs
from_slice: 306.00µs
preparation_step::preparation::prepare: 265.00µs
air::preparation_step::preparation::make_exec_ctx: 16.00µs
air_parser::parser::air_parser::parse: 45.00µs
runner::execute: 3.34ms
runner::farewell: 502.00µs
from_success_result: 478.00µs
populate_outcome_from_contexts: 432.00µs
air_parser::parser::air_parser::parse: 42.00µs
runner::execute: 39.70ms
ap_map::execute: 17.74ms
call::execute: 104.00µs
execute: 27.00µs
new: 17.00µs
canon_stream_map_scalar::execute: 276.00µs
runner::farewell: 577.00µs
from_success_result: 555.00µs
populate_outcome_from_contexts: 516.00µs
to_vec(call_results): 13.00µs
to_vec(data): 144.00µs
signing_step::sign_produced_cids: 9.00µs
verification_step::verify: 9.00µs
canon-map-scalar-single-key (33.70ms; 52.000 MiB, 52.000 MiB): benchmarking a map insert operation
air::runner::execute_air: 33.70ms
preparation_step::preparation::parse_data: 366.00µs
from_slice: 323.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: 40.00µs
runner::execute: 32.30ms
ap_map::execute: 13.90ms
call::execute: 101.00µs
execute: 26.00µs
new: 18.00µs
canon_stream_map_scalar::execute: 244.00µs
runner::farewell: 606.00µs
from_success_result: 584.00µs
populate_outcome_from_contexts: 531.00µs
to_vec(call_results): 13.00µs
to_vec(data): 176.00µs
signing_step::sign_produced_cids: 10.00µs
verification_step::verify: 9.00µs
canon-map-scalar-single-key (3.65ms; 52.000 MiB, 52.000 MiB): benchmarking a map insert operation
air::runner::execute_air: 3.65ms
preparation_step::preparation::parse_data: 362.00µs
from_slice: 320.00µs
canon-map-single-key (40.80ms; 54.250 MiB, 54.250 MiB): benchmarking a map insert operation
air::runner::execute_air: 40.80ms
preparation_step::preparation::parse_data: 365.00µs
from_slice: 323.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: 39.00µs
runner::execute: 2.39ms
runner::farewell: 497.00µs
from_success_result: 474.00µs
populate_outcome_from_contexts: 417.00µs
signing_step::sign_produced_cids: 10.00µs
air_parser::parser::air_parser::parse: 41.00µs
runner::execute: 37.10ms
ap_map::execute: 13.29ms
call::execute: 102.00µs
execute: 27.00µs
new: 17.00µs
canon_map::execute: 6.43ms
runner::farewell: 3.01ms
from_success_result: 2.99ms
populate_outcome_from_contexts: 2.70ms
to_vec(call_results): 13.00µs
to_vec(data): 2.32ms
signing_step::sign_produced_cids: 9.00µs
verification_step::verify: 9.00µs
canon-map-single-key (13.00ms; 54.250 MiB, 54.250 MiB): benchmarking a map insert operation
air::runner::execute_air: 13.00ms
preparation_step::preparation::parse_data: 361.00µs
from_slice: 320.00µs
preparation_step::preparation::prepare: 261.00µs
air::preparation_step::preparation::make_exec_ctx: 16.00µs
air_parser::parser::air_parser::parse: 39.00µs
runner::execute: 8.91ms
runner::farewell: 3.25ms
from_success_result: 3.22ms
populate_outcome_from_contexts: 2.92ms
signing_step::sign_produced_cids: 11.00µs
dashboard (32.40ms; 51.562 MiB, 51.562 MiB): big dashboard test
air::runner::execute_air: 32.40ms
preparation_step::preparation::parse_data: 1.58ms
from_slice: 1.51ms
preparation_step::preparation::prepare: 405.00µs
air::preparation_step::preparation::make_exec_ctx: 49.00µs
air_parser::parser::air_parser::parse: 141.00µs
runner::execute: 29.60ms
execute: 23.56ms
execute: 7.15ms
prepare_request_params: 1.89ms
to_string(tetraplets): 577.00µs
new: 3.78ms
runner::farewell: 685.00µs
from_success_result: 663.00µs
populate_outcome_from_contexts: 615.00µs
to_vec(call_results): 30.00µs
to_vec(data): 278.00µs
signing_step::sign_produced_cids: 9.00µs
verification_step::verify: 9.00µs
dashboard (4.94ms; 51.562 MiB, 51.562 MiB): big dashboard test
air::runner::execute_air: 4.94ms
preparation_step::preparation::parse_data: 1.49ms
from_slice: 1.43ms
preparation_step::preparation::prepare: 381.00µs
air::preparation_step::preparation::make_exec_ctx: 40.00µs
air_parser::parser::air_parser::parse: 132.00µs
runner::execute: 2.33ms
to_string(tetraplets): 455.00µs
runner::farewell: 615.00µs
from_success_result: 592.00µs
populate_outcome_from_contexts: 537.00µs
multiple-cids10 (13.80ms; 51.438 MiB, 51.438 MiB): verifying multiple CIDs for single peer
air::runner::execute_air: 13.80ms
preparation_step::preparation::parse_data: 488.00µs
from_slice: 431.00µs
preparation_step::preparation::prepare: 283.00µs
air::preparation_step::preparation::make_exec_ctx: 33.00µs
air_parser::parser::air_parser::parse: 43.00µs
runner::execute: 12.40ms
execute: 9.44ms
execute: 2.26ms
prepare_request_params: 49.00µs
to_string(tetraplets): 15.00µs
new: 1.49ms
runner::farewell: 578.00µs
from_success_result: 556.00µs
populate_outcome_from_contexts: 501.00µs
to_vec(call_results): 14.00µs
to_vec(data): 230.00µs
signing_step::sign_produced_cids: 9.00µs
verification_step::verify: 8.00µs
multiple-cids10 (2.40ms; 51.438 MiB, 51.438 MiB): verifying multiple CIDs for single peer
air::runner::execute_air: 2.40ms
preparation_step::preparation::parse_data: 563.00µs
from_slice: 474.00µs
preparation_step::preparation::prepare: 325.00µs
air::preparation_step::preparation::make_exec_ctx: 41.00µs
air_parser::parser::air_parser::parse: 50.00µs
runner::execute: 740.00µs
to_string(tetraplets): 20.00µs
runner::farewell: 626.00µs
from_success_result: 601.00µs
populate_outcome_from_contexts: 512.00µs
signing_step::sign_produced_cids: 13.00µs
verification_step::verify: 10.00µs
multiple-peers8 (9.19ms; 52.375 MiB, 52.375 MiB): verifying many CIDs for many peers
air::runner::execute_air: 9.19ms
preparation_step::preparation::parse_data: 2.39ms
from_slice: 2.29ms
preparation_step::preparation::prepare: 400.00µs
air::preparation_step::preparation::make_exec_ctx: 126.00µs
air_parser::parser::air_parser::parse: 54.00µs
runner::execute: 4.67ms
to_string(tetraplets): 34.00µs
runner::farewell: 1.54ms
from_success_result: 1.51ms
populate_outcome_from_contexts: 1.37ms
signing_step::sign_produced_cids: 10.00µs
verification_step::verify: 18.00µs
multiple-sigs30 (23.00ms; 55.125 MiB, 55.125 MiB): signing multiple CIDs
air::runner::execute_air: 23.00ms
preparation_step::preparation::parse_data: 5.07ms
from_slice: 5.00ms
preparation_step::preparation::prepare: 495.00µs
air::preparation_step::preparation::make_exec_ctx: 237.00µs
multiple-peers8 (70.30ms; 52.375 MiB, 52.375 MiB): verifying many CIDs for many peers
air::runner::execute_air: 70.30ms
preparation_step::preparation::parse_data: 1.86ms
from_slice: 1.80ms
preparation_step::preparation::prepare: 374.00µs
air::preparation_step::preparation::make_exec_ctx: 115.00µs
air_parser::parser::air_parser::parse: 49.00µs
runner::execute: 13.00ms
runner::farewell: 4.28ms
from_success_result: 4.25ms
populate_outcome_from_contexts: 4.05ms
runner::execute: 66.40ms
execute: 51.27ms
execute: 12.84ms
prepare_request_params: 50.00µs
to_string(tetraplets): 15.00µs
new: 8.50ms
runner::farewell: 1.59ms
from_success_result: 1.57ms
populate_outcome_from_contexts: 1.44ms
to_vec(call_results): 14.00µs
to_vec(data): 949.00µs
signing_step::sign_produced_cids: 9.00µs
verification_step::verify: 8.00µs
multiple-sigs30 (125.00ms; 55.125 MiB, 55.125 MiB): signing multiple CIDs
air::runner::execute_air: 125.00ms
preparation_step::preparation::parse_data: 4.95ms
from_slice: 4.89ms
preparation_step::preparation::prepare: 499.00µs
air::preparation_step::preparation::make_exec_ctx: 237.00µs
air_parser::parser::air_parser::parse: 52.00µs
runner::execute: 115.00ms
call::execute: 82.12ms
execute: 19.60ms
new: 12.95ms
canon::execute: 6.97ms
runner::farewell: 4.41ms
from_success_result: 4.39ms
populate_outcome_from_contexts: 4.20ms
to_vec(call_results): 14.00µs
to_vec(data): 3.00ms
signing_step::sign_produced_cids: 9.00µs
verification_step::verify: 9.00µs
network-explore (1.89ms; 51.375 MiB, 51.375 MiB): 5 peers of network are discovered
air::runner::execute_air: 1.89ms
preparation_step::preparation::parse_data: 822.00µs
from_slice: 748.00µs
preparation_step::preparation::prepare: 336.00µs
air::preparation_step::preparation::make_exec_ctx: 30.00µs
air_parser::parser::air_parser::parse: 78.00µs
runner::execute: 205.00µs
to_string(tetraplets): 13.00µs
runner::farewell: 359.00µs
from_success_result: 335.00µs
populate_outcome_from_contexts: 286.00µs
signing_step::sign_produced_cids: 17.00µs
network-explore (4.02ms; 51.375 MiB, 51.375 MiB): 5 peers of network are discovered
air::runner::execute_air: 4.02ms
preparation_step::preparation::parse_data: 663.00µs
from_slice: 602.00µs
preparation_step::preparation::prepare: 302.00µs
air::preparation_step::preparation::make_exec_ctx: 23.00µs
air_parser::parser::air_parser::parse: 68.00µs
runner::execute: 2.50ms
execute: 1.92ms
execute: 482.00µs
prepare_request_params: 51.00µs
to_string(tetraplets): 16.00µs
new: 322.00µs
runner::farewell: 414.00µs
from_success_result: 391.00µs
populate_outcome_from_contexts: 351.00µs
to_vec(call_results): 14.00µs
to_vec(data): 91.00µs
signing_step::sign_produced_cids: 9.00µs
verification_step::verify: 9.00µs
populate-map (3.81ms; 51.938 MiB, 51.938 MiB): benchmarking a map insert operation
air::runner::execute_air: 3.81ms
@ -492,31 +568,45 @@ Machine 88756ca30bfb93b0da6a64252adc98fc3e97e142c3b4970af3d2948fd66107b4:
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 (3.74ms; 51.938 MiB, 51.938 MiB): benchmarking a map insert operation
air::runner::execute_air: 3.74ms
populate-map-multiple-keys (39.20ms; 52.000 MiB, 52.000 MiB): benchmarking a map insert operation
air::runner::execute_air: 39.20ms
preparation_step::preparation::parse_data: 131.00µs
from_slice: 92.00µs
preparation_step::preparation::prepare: 271.00µs
from_slice: 91.00µs
preparation_step::preparation::prepare: 270.00µs
air::preparation_step::preparation::make_exec_ctx: 16.00µs
air_parser::parser::air_parser::parse: 47.00µs
runner::execute: 2.79ms
runner::farewell: 409.00µs
from_success_result: 387.00µs
populate_outcome_from_contexts: 346.00µs
signing_step::sign_produced_cids: 10.00µs
verification_step::verify: 9.00µs
populate-map-single-key (2.93ms; 51.875 MiB, 51.875 MiB): benchmarking a map insert operation
air::runner::execute_air: 2.93ms
preparation_step::preparation::parse_data: 189.00µs
from_slice: 149.00µs
preparation_step::preparation::prepare: 271.00µs
runner::execute: 38.20ms
ap_map::execute: 16.89ms
call::execute: 189.00µs
execute: 49.00µs
new: 31.00µs
canon_map::execute: 32.00µs
runner::farewell: 465.00µs
from_success_result: 443.00µs
populate_outcome_from_contexts: 408.00µs
to_vec(call_results): 13.00µs
to_vec(data): 137.00µs
signing_step::sign_produced_cids: 9.00µs
verification_step::verify: 8.00µs
populate-map-single-key (12.80ms; 51.500 MiB, 51.500 MiB): benchmarking a map insert operation
air::runner::execute_air: 12.80ms
preparation_step::preparation::parse_data: 154.00µs
from_slice: 113.00µs
preparation_step::preparation::prepare: 267.00µs
air::preparation_step::preparation::make_exec_ctx: 16.00µs
air_parser::parser::air_parser::parse: 43.00µs
runner::execute: 1.91ms
runner::farewell: 429.00µs
from_success_result: 407.00µs
populate_outcome_from_contexts: 353.00µs
signing_step::sign_produced_cids: 10.00µs
air_parser::parser::air_parser::parse: 42.00µs
runner::execute: 11.80ms
ap_map::execute: 4.96ms
call::execute: 194.00µs
execute: 51.00µs
new: 32.00µs
canon_map::execute: 32.00µs
runner::farewell: 426.00µs
from_success_result: 404.00µs
populate_outcome_from_contexts: 364.00µs
to_vec(call_results): 13.00µs
to_vec(data): 99.00µs
signing_step::sign_produced_cids: 9.00µs
verification_step::verify: 9.00µs
Machine c1f3ea5950db0a10b44da931c25774d64ab25084f47d504f72f311e694550ff1:
Platform: macOS-12.0.1-x86_64-i386-64bit

4261
junk/gen-bench-data/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -7,18 +7,8 @@ set -e
echo "Pre-build a binary..." >&2
cargo build --quiet --release
for bench in 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 \
populate-map-multiple-keys \
populate-map-single-key \
multiple-cids10 \
multiple-peers8 \
multiple-sigs30 \
dashboard network-explore;
for bench in populate-map-single-key \
populate-map-multiple-keys ;
do
echo "Generating ${bench} ..." >&2
DESTDIR="../../benches/performance_metering/${bench}/"

View File

@ -58,8 +58,8 @@ 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::PopulateMapMultipleKeys => populate_map_multiple_keys(10),
Bench::PopulateMapSingleKey => populate_map_single_key(800),
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),