mirror of
https://github.com/fluencelabs/aquavm
synced 2024-12-04 15:20:16 +00:00
feat(tools): merge some tools into the air
CLI tool (#509)
* feat(tools): merge some tools into the `air` CLI tool `air-beautify` and `air-trace` are merged into a single `air` tool. Its crate name is `fluence-air-cli` as otherwise it confilicts with `air` interpreter crate. The tool has subcommands `beautify`, `run` and `stats`. * Add one-letter aliases to `air` CLI subcommands + `air beautify` => `air b` + `air run` => `air r` + `air stats` => `air s` --------- Co-authored-by: Mike Voronov <michail.vms@gmail.com>
This commit is contained in:
parent
790d3c2119
commit
79ac153f1d
5
.github/release-please/config.json
vendored
5
.github/release-please/config.json
vendored
@ -48,10 +48,7 @@
|
|||||||
},
|
},
|
||||||
"crates/data-store": {},
|
"crates/data-store": {},
|
||||||
"crates/testing-framework": {},
|
"crates/testing-framework": {},
|
||||||
"tools/cli/air-beautify": {
|
"tools/cli/aquavm-air-cli": {},
|
||||||
"component": "air-beautify"
|
|
||||||
},
|
|
||||||
"tools/cli/air-trace": {},
|
|
||||||
"tools/wasm/air-beautify-wasm": {
|
"tools/wasm/air-beautify-wasm": {
|
||||||
"component": "air-beautify-wasm"
|
"component": "air-beautify-wasm"
|
||||||
}
|
}
|
||||||
|
3
.github/release-please/manifest.json
vendored
3
.github/release-please/manifest.json
vendored
@ -14,7 +14,6 @@
|
|||||||
"crates/beautifier": "0.1.1",
|
"crates/beautifier": "0.1.1",
|
||||||
"crates/data-store": "0.6.0",
|
"crates/data-store": "0.6.0",
|
||||||
"crates/testing-framework": "0.1.5",
|
"crates/testing-framework": "0.1.5",
|
||||||
"tools/cli/air-beautify": "0.1.1",
|
"tools/cli/aquavm-air-cli": "0.2.6",
|
||||||
"tools/cli/air-trace": "0.2.6",
|
|
||||||
"tools/wasm/air-beautify-wasm": "0.1.0"
|
"tools/wasm/air-beautify-wasm": "0.1.0"
|
||||||
}
|
}
|
||||||
|
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -105,8 +105,8 @@ jobs:
|
|||||||
- name: Run cargo check
|
- name: Run cargo check
|
||||||
run: cargo check
|
run: cargo check
|
||||||
|
|
||||||
- name: Check native air-trace
|
- name: Check native aquavm-air-cli
|
||||||
run: cargo check --package air-trace --no-default-features
|
run: cargo check --package aquavm-air-cli --no-default-features
|
||||||
|
|
||||||
- name: Run cargo clippy
|
- name: Run cargo clippy
|
||||||
run: cargo clippy -v
|
run: cargo clippy -v
|
||||||
|
180
Cargo.lock
generated
180
Cargo.lock
generated
@ -11,63 +11,15 @@ dependencies = [
|
|||||||
"memchr",
|
"memchr",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "air"
|
|
||||||
version = "0.37.0"
|
|
||||||
dependencies = [
|
|
||||||
"air-execution-info-collector",
|
|
||||||
"air-interpreter-cid",
|
|
||||||
"air-interpreter-data",
|
|
||||||
"air-interpreter-interface",
|
|
||||||
"air-lambda-ast",
|
|
||||||
"air-lambda-parser",
|
|
||||||
"air-log-targets",
|
|
||||||
"air-parser",
|
|
||||||
"air-test-utils",
|
|
||||||
"air-testing-framework",
|
|
||||||
"air-trace-handler",
|
|
||||||
"air-utils",
|
|
||||||
"boolinator",
|
|
||||||
"concat-idents",
|
|
||||||
"criterion 0.3.6",
|
|
||||||
"csv",
|
|
||||||
"env_logger",
|
|
||||||
"fluence-app-service",
|
|
||||||
"fstrings",
|
|
||||||
"log",
|
|
||||||
"maplit",
|
|
||||||
"marine-rs-sdk",
|
|
||||||
"non-empty-vec",
|
|
||||||
"once_cell",
|
|
||||||
"polyplets",
|
|
||||||
"pretty_assertions 0.6.1",
|
|
||||||
"semver 1.0.17",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"strum",
|
|
||||||
"strum_macros",
|
|
||||||
"thiserror",
|
|
||||||
"tracing",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "air-beautifier"
|
name = "air-beautifier"
|
||||||
version = "0.1.2"
|
version = "0.1.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"air-parser",
|
"aquavm-air-parser",
|
||||||
"itertools",
|
"itertools",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "air-beautify"
|
|
||||||
version = "0.1.2"
|
|
||||||
dependencies = [
|
|
||||||
"air-beautifier",
|
|
||||||
"anyhow",
|
|
||||||
"clap 4.1.8",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "air-beautify-wasm"
|
name = "air-beautify-wasm"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
@ -80,16 +32,16 @@ dependencies = [
|
|||||||
name = "air-execution-info-collector"
|
name = "air-execution-info-collector"
|
||||||
version = "0.7.3"
|
version = "0.7.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"air-parser",
|
"aquavm-air-parser",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "air-interpreter"
|
name = "air-interpreter"
|
||||||
version = "0.37.0"
|
version = "0.37.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"air",
|
|
||||||
"air-interpreter-interface",
|
"air-interpreter-interface",
|
||||||
"air-log-targets",
|
"air-log-targets",
|
||||||
|
"aquavm-air",
|
||||||
"log",
|
"log",
|
||||||
"marine-rs-sdk",
|
"marine-rs-sdk",
|
||||||
"serde",
|
"serde",
|
||||||
@ -115,8 +67,8 @@ version = "0.6.3"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"air-interpreter-cid",
|
"air-interpreter-cid",
|
||||||
"air-interpreter-interface",
|
"air-interpreter-interface",
|
||||||
"air-parser",
|
|
||||||
"air-utils",
|
"air-utils",
|
||||||
|
"aquavm-air-parser",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"polyplets",
|
"polyplets",
|
||||||
"semver 1.0.17",
|
"semver 1.0.17",
|
||||||
@ -166,36 +118,14 @@ dependencies = [
|
|||||||
name = "air-log-targets"
|
name = "air-log-targets"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "air-parser"
|
|
||||||
version = "0.7.3"
|
|
||||||
dependencies = [
|
|
||||||
"air-lambda-ast",
|
|
||||||
"air-lambda-parser",
|
|
||||||
"codespan",
|
|
||||||
"codespan-reporting",
|
|
||||||
"criterion 0.4.0",
|
|
||||||
"fstrings",
|
|
||||||
"itertools",
|
|
||||||
"lalrpop",
|
|
||||||
"lalrpop-util",
|
|
||||||
"multimap",
|
|
||||||
"non-empty-vec",
|
|
||||||
"regex",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"thiserror",
|
|
||||||
"tracing",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "air-test-utils"
|
name = "air-test-utils"
|
||||||
version = "0.4.5"
|
version = "0.4.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"air",
|
|
||||||
"air-interpreter-cid",
|
"air-interpreter-cid",
|
||||||
"air-interpreter-data",
|
"air-interpreter-data",
|
||||||
"air-interpreter-interface",
|
"air-interpreter-interface",
|
||||||
|
"aquavm-air",
|
||||||
"avm-interface",
|
"avm-interface",
|
||||||
"avm-server",
|
"avm-server",
|
||||||
"fstrings",
|
"fstrings",
|
||||||
@ -212,8 +142,8 @@ dependencies = [
|
|||||||
name = "air-testing-framework"
|
name = "air-testing-framework"
|
||||||
version = "0.1.5"
|
version = "0.1.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"air-parser",
|
|
||||||
"air-test-utils",
|
"air-test-utils",
|
||||||
|
"aquavm-air-parser",
|
||||||
"itertools",
|
"itertools",
|
||||||
"maplit",
|
"maplit",
|
||||||
"nom 7.1.3",
|
"nom 7.1.3",
|
||||||
@ -223,23 +153,6 @@ dependencies = [
|
|||||||
"strum",
|
"strum",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "air-trace"
|
|
||||||
version = "0.2.6"
|
|
||||||
dependencies = [
|
|
||||||
"air",
|
|
||||||
"air-interpreter-interface",
|
|
||||||
"air-test-utils",
|
|
||||||
"anyhow",
|
|
||||||
"avm-data-store",
|
|
||||||
"avm-interface",
|
|
||||||
"clap 4.1.8",
|
|
||||||
"itertools",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"tracing-subscriber",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "air-trace-handler"
|
name = "air-trace-handler"
|
||||||
version = "0.1.2"
|
version = "0.1.2"
|
||||||
@ -248,7 +161,7 @@ dependencies = [
|
|||||||
"air-interpreter-data",
|
"air-interpreter-data",
|
||||||
"air-interpreter-interface",
|
"air-interpreter-interface",
|
||||||
"air-log-targets",
|
"air-log-targets",
|
||||||
"air-parser",
|
"aquavm-air-parser",
|
||||||
"bimap",
|
"bimap",
|
||||||
"log",
|
"log",
|
||||||
"polyplets",
|
"polyplets",
|
||||||
@ -291,6 +204,85 @@ version = "1.0.69"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800"
|
checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "aquavm-air"
|
||||||
|
version = "0.37.0"
|
||||||
|
dependencies = [
|
||||||
|
"air-execution-info-collector",
|
||||||
|
"air-interpreter-cid",
|
||||||
|
"air-interpreter-data",
|
||||||
|
"air-interpreter-interface",
|
||||||
|
"air-lambda-ast",
|
||||||
|
"air-lambda-parser",
|
||||||
|
"air-log-targets",
|
||||||
|
"air-test-utils",
|
||||||
|
"air-testing-framework",
|
||||||
|
"air-trace-handler",
|
||||||
|
"air-utils",
|
||||||
|
"aquavm-air-parser",
|
||||||
|
"boolinator",
|
||||||
|
"concat-idents",
|
||||||
|
"criterion 0.3.6",
|
||||||
|
"csv",
|
||||||
|
"env_logger",
|
||||||
|
"fluence-app-service",
|
||||||
|
"fstrings",
|
||||||
|
"log",
|
||||||
|
"maplit",
|
||||||
|
"marine-rs-sdk",
|
||||||
|
"non-empty-vec",
|
||||||
|
"once_cell",
|
||||||
|
"polyplets",
|
||||||
|
"pretty_assertions 0.6.1",
|
||||||
|
"semver 1.0.17",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"strum",
|
||||||
|
"strum_macros",
|
||||||
|
"thiserror",
|
||||||
|
"tracing",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "aquavm-air-cli"
|
||||||
|
version = "0.2.6"
|
||||||
|
dependencies = [
|
||||||
|
"air-beautifier",
|
||||||
|
"air-interpreter-interface",
|
||||||
|
"air-test-utils",
|
||||||
|
"anyhow",
|
||||||
|
"aquavm-air",
|
||||||
|
"avm-data-store",
|
||||||
|
"avm-interface",
|
||||||
|
"clap 4.1.8",
|
||||||
|
"itertools",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"tracing-subscriber",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "aquavm-air-parser"
|
||||||
|
version = "0.7.3"
|
||||||
|
dependencies = [
|
||||||
|
"air-lambda-ast",
|
||||||
|
"air-lambda-parser",
|
||||||
|
"codespan",
|
||||||
|
"codespan-reporting",
|
||||||
|
"criterion 0.4.0",
|
||||||
|
"fstrings",
|
||||||
|
"itertools",
|
||||||
|
"lalrpop",
|
||||||
|
"lalrpop-util",
|
||||||
|
"multimap",
|
||||||
|
"non-empty-vec",
|
||||||
|
"regex",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"thiserror",
|
||||||
|
"tracing",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "arrayref"
|
name = "arrayref"
|
||||||
version = "0.3.6"
|
version = "0.3.6"
|
||||||
|
@ -19,8 +19,7 @@ members = [
|
|||||||
"crates/beautifier",
|
"crates/beautifier",
|
||||||
"crates/data-store",
|
"crates/data-store",
|
||||||
"crates/testing-framework",
|
"crates/testing-framework",
|
||||||
"tools/cli/air-beautify",
|
"tools/cli/air",
|
||||||
"tools/cli/air-trace",
|
|
||||||
"tools/wasm/air-beautify-wasm",
|
"tools/wasm/air-beautify-wasm",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ name = "air_interpreter_server"
|
|||||||
path = "src/marine.rs"
|
path = "src/marine.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
air = { version = "0.37.0", path = "../air" }
|
aquavm-air = { version = "0.37.0", path = "../air" }
|
||||||
air-interpreter-interface = { version = "0.12.1", path = "../crates/air-lib/interpreter-interface" }
|
air-interpreter-interface = { version = "0.12.1", path = "../crates/air-lib/interpreter-interface" }
|
||||||
air-log-targets = { version = "0.1.0", path = "../crates/air-lib/log-targets" }
|
air-log-targets = { version = "0.1.0", path = "../crates/air-lib/log-targets" }
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "air"
|
name = "aquavm-air"
|
||||||
version = "0.37.0"
|
version = "0.37.0"
|
||||||
description = "Interpreter of AIR scripts intended to coordinate request flow in the Fluence network"
|
description = "Interpreter of AIR scripts intended to coordinate request flow in the Fluence network"
|
||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
repository = "https://github.com/fluencelabs/aquavm"
|
repository = "https://github.com/fluencelabs/aquavm"
|
||||||
publish = false
|
documentation = "https://docs.rs/aquavm-air"
|
||||||
keywords = ["fluence", "air", "webassembly", "programming-language"]
|
keywords = ["fluence", "air", "webassembly", "programming-language"]
|
||||||
categories = ["wasm"]
|
categories = ["wasm"]
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ path = "src/lib.rs"
|
|||||||
doctest = false
|
doctest = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
air-parser = { version = "0.7.2", path = "../crates/air-lib/air-parser" }
|
aquavm-air-parser = { version = "0.7.2", path = "../crates/air-lib/air-parser" }
|
||||||
air-execution-info-collector = { version = "0.7.2", path = "../crates/air-lib/execution-info-collector" }
|
air-execution-info-collector = { version = "0.7.2", path = "../crates/air-lib/execution-info-collector" }
|
||||||
air-interpreter-cid = { version = "0.2.0", path = "../crates/air-lib/interpreter-cid" }
|
air-interpreter-cid = { version = "0.2.0", path = "../crates/air-lib/interpreter-cid" }
|
||||||
air-interpreter-data = { version = "0.6.2", path = "../crates/air-lib/interpreter-data" }
|
air-interpreter-data = { version = "0.6.2", path = "../crates/air-lib/interpreter-data" }
|
||||||
|
@ -9,7 +9,7 @@ name = "auth_module"
|
|||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
air = { path = "../../../../../../../air" }
|
aquavm-air = { path = "../../../../../../../air" }
|
||||||
marine-rs-sdk = "0.7.0"
|
marine-rs-sdk = "0.7.0"
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
|
@ -9,7 +9,7 @@ name = "log_storage"
|
|||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
air = { path = "../../../../../../../air" }
|
aquavm-air = { path = "../../../../../../../air" }
|
||||||
marine-rs-sdk = "0.7.0"
|
marine-rs-sdk = "0.7.0"
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
|
@ -5,7 +5,7 @@ set -o pipefail -e
|
|||||||
# Its dependencies:
|
# Its dependencies:
|
||||||
# + jq utility
|
# + jq utility
|
||||||
# + compiled AquaVM WASM binary
|
# + compiled AquaVM WASM binary
|
||||||
# + installed air-trace
|
# + installed air
|
||||||
|
|
||||||
function trace_len {
|
function trace_len {
|
||||||
jq '.trace | length'
|
jq '.trace | length'
|
||||||
@ -37,7 +37,7 @@ function error {
|
|||||||
function main {
|
function main {
|
||||||
if [ "$#" \< 2 ]; then
|
if [ "$#" \< 2 ]; then
|
||||||
if [ x"$1" == x"--help" ]; then
|
if [ x"$1" == x"--help" ]; then
|
||||||
error "usage: $0 (--all|big|long) (--all|merge|nomerge) [ air-trace run args ... ]"
|
error "usage: $0 (--all|big|long) (--all|merge|nomerge) [ air run args ... ]"
|
||||||
else
|
else
|
||||||
error "Provide at least two arguments: (--all|big|long) and (--all|merge|nomerge)"
|
error "Provide at least two arguments: (--all|big|long) and (--all|merge|nomerge)"
|
||||||
fi
|
fi
|
||||||
@ -113,7 +113,7 @@ function main {
|
|||||||
echo >&1
|
echo >&1
|
||||||
echo "*** Running test ${tst}-${subt}..." >&1
|
echo "*** Running test ${tst}-${subt}..." >&1
|
||||||
eval "${script_cmd}" | \
|
eval "${script_cmd}" | \
|
||||||
air-trace run "$@" --repeat 1 --plain \
|
air run "$@" --repeat 1 --plain \
|
||||||
--prev-data "$prev_data_path" \
|
--prev-data "$prev_data_path" \
|
||||||
--data "$current_data_path"
|
--data "$current_data_path"
|
||||||
done
|
done
|
||||||
|
@ -1,14 +1,19 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "air-parser"
|
name = "aquavm-air-parser"
|
||||||
description = "Parser of the AIR scripts in a form of string to AST"
|
description = "Parser of the AIR scripts in a form of string to AST"
|
||||||
version = "0.7.3"
|
version = "0.7.3"
|
||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
publish = false
|
documentation = "https://docs.rs/air-parser"
|
||||||
|
repository = "https://github.com/fluencelabs/aquavm"
|
||||||
keywords = ["fluence", "air", "parser", "lalrpop"]
|
keywords = ["fluence", "air", "parser", "lalrpop"]
|
||||||
categories = ["wasm"]
|
categories = ["wasm"]
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
name = "air_parser"
|
||||||
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
lalrpop = "0.19.8"
|
lalrpop = "0.19.8"
|
||||||
|
|
||||||
|
@ -5,7 +5,8 @@ description = "Implementation of AIR execution info collector"
|
|||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
publish = false
|
repository = "https://github.com/fluencelabs/aquavm"
|
||||||
|
documentation = "https://docs.rs/air-execution-info-collector"
|
||||||
keywords = ["fluence", "air", "webassembly", "programming-language"]
|
keywords = ["fluence", "air", "webassembly", "programming-language"]
|
||||||
categories = ["wasm"]
|
categories = ["wasm"]
|
||||||
|
|
||||||
@ -14,4 +15,4 @@ name = "air_execution_info_collector"
|
|||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
air-parser = { path = "../air-parser" }
|
aquavm-air-parser = { path = "../air-parser" }
|
||||||
|
@ -5,7 +5,8 @@ version = "0.6.3"
|
|||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
publish = false
|
repository = "https://github.com/fluencelabs/aquavm"
|
||||||
|
documentation = "https://docs.rs/air-interpreter-data"
|
||||||
keywords = ["fluence", "air", "webassembly", "programming-language"]
|
keywords = ["fluence", "air", "webassembly", "programming-language"]
|
||||||
categories = ["wasm"]
|
categories = ["wasm"]
|
||||||
|
|
||||||
@ -15,7 +16,7 @@ path = "src/lib.rs"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
air-utils = { version = "0.1.0", path = "../utils" }
|
air-utils = { version = "0.1.0", path = "../utils" }
|
||||||
air-parser = { version = "0.7.3", path = "../air-parser" }
|
aquavm-air-parser = { version = "0.7.3", path = "../air-parser" }
|
||||||
air-interpreter-interface = { version = "0.12.1", path = "../interpreter-interface" }
|
air-interpreter-interface = { version = "0.12.1", path = "../interpreter-interface" }
|
||||||
air-interpreter-cid = { version = "0.2.0", path = "../interpreter-cid" }
|
air-interpreter-cid = { version = "0.2.0", path = "../interpreter-cid" }
|
||||||
polyplets = { version = "0.3.2", path = "../polyplets" }
|
polyplets = { version = "0.3.2", path = "../polyplets" }
|
||||||
|
@ -5,7 +5,8 @@ version = "0.1.0"
|
|||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
publish = false
|
repository = "https://github.com/fluencelabs/aquavm"
|
||||||
|
documentation = "https://docs.rs/air-lambda-ast"
|
||||||
keywords = ["fluence", "air", "lambda", "ast"]
|
keywords = ["fluence", "air", "lambda", "ast"]
|
||||||
categories = ["wasm"]
|
categories = ["wasm"]
|
||||||
|
|
||||||
|
@ -5,7 +5,8 @@ version = "0.1.0"
|
|||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
publish = false
|
repository = "https://github.com/fluencelabs/aquavm"
|
||||||
|
documentation = "https://docs.rs/air-lambda-parser"
|
||||||
keywords = ["fluence", "air", "parser", "lalrpop"]
|
keywords = ["fluence", "air", "parser", "lalrpop"]
|
||||||
categories = ["wasm"]
|
categories = ["wasm"]
|
||||||
|
|
||||||
|
@ -5,7 +5,8 @@ description = "Definition of global consts used for logging"
|
|||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
publish = false
|
repository = "https://github.com/fluencelabs/aquavm"
|
||||||
|
documentation = "https://docs.rs/air-log-targets"
|
||||||
keywords = ["fluence", "air", "webassembly", "programming-language"]
|
keywords = ["fluence", "air", "webassembly", "programming-language"]
|
||||||
categories = ["wasm"]
|
categories = ["wasm"]
|
||||||
|
|
||||||
|
@ -5,7 +5,8 @@ description = "Test utils for the AIR interpreter"
|
|||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
publish = false
|
repository = "https://github.com/fluencelabs/aquavm"
|
||||||
|
documentation = "https://docs.rs/air-test-utils"
|
||||||
keywords = ["fluence", "air", "webassembly", "security", "authorization"]
|
keywords = ["fluence", "air", "webassembly", "security", "authorization"]
|
||||||
categories = ["wasm"]
|
categories = ["wasm"]
|
||||||
|
|
||||||
@ -14,7 +15,7 @@ name = "air_test_utils"
|
|||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
air = { path = "../../../air" }
|
aquavm-air = { path = "../../../air" }
|
||||||
air-interpreter-cid = { version = "0.2.0", path = "../interpreter-cid" }
|
air-interpreter-cid = { version = "0.2.0", path = "../interpreter-cid" }
|
||||||
air-interpreter-data = { version = "0.6.3", path = "../interpreter-data" }
|
air-interpreter-data = { version = "0.6.3", path = "../interpreter-data" }
|
||||||
air-interpreter-interface = { version = "0.12.1", path = "../interpreter-interface" }
|
air-interpreter-interface = { version = "0.12.1", path = "../interpreter-interface" }
|
||||||
|
@ -18,7 +18,7 @@ air-interpreter-cid = { version = "0.2.0", path = "../interpreter-cid" }
|
|||||||
air-interpreter-data = { version = "0.6.3", path = "../interpreter-data" }
|
air-interpreter-data = { version = "0.6.3", path = "../interpreter-data" }
|
||||||
air-interpreter-interface = { version = "0.12.1", path = "../interpreter-interface" }
|
air-interpreter-interface = { version = "0.12.1", path = "../interpreter-interface" }
|
||||||
air-log-targets = { version = "0.1.0", path = "../log-targets" }
|
air-log-targets = { version = "0.1.0", path = "../log-targets" }
|
||||||
air-parser = { version = "0.7.3", path = "../air-parser" }
|
aquavm-air-parser = { version = "0.7.3", path = "../air-parser" }
|
||||||
polyplets = { version = "0.3.2", path = "../polyplets" }
|
polyplets = { version = "0.3.2", path = "../polyplets" }
|
||||||
|
|
||||||
bimap = "0.6.2"
|
bimap = "0.6.2"
|
||||||
|
@ -5,8 +5,8 @@ description = "AIR human-readable format transformer library"
|
|||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/beautifier"
|
repository = "https://github.com/fluencelabs/aquavm"
|
||||||
publish = false
|
documentation = "https://docs.rs/air-beautifier"
|
||||||
keywords = ["fluence", "air", "beautifier"]
|
keywords = ["fluence", "air", "beautifier"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
@ -14,6 +14,6 @@ name = "air_beautifier"
|
|||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
air-parser = { version = "0.7.3", path = "../air-lib/air-parser" }
|
aquavm-air-parser = { version = "0.7.3", path = "../air-lib/air-parser" }
|
||||||
itertools = "0.10.5"
|
itertools = "0.10.5"
|
||||||
thiserror = "1.0.39"
|
thiserror = "1.0.39"
|
||||||
|
@ -15,7 +15,7 @@ path = "src/lib.rs"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
air-test-utils = { version = "0.4.5", path = "../air-lib/test-utils" }
|
air-test-utils = { version = "0.4.5", path = "../air-lib/test-utils" }
|
||||||
air-parser = { version = "0.7.3", path = "../air-lib/air-parser" }
|
aquavm-air-parser = { version = "0.7.3", path = "../air-lib/air-parser" }
|
||||||
|
|
||||||
itertools = "0.10.5"
|
itertools = "0.10.5"
|
||||||
strum = { version="0.24.1", features=["derive"] }
|
strum = { version="0.24.1", features=["derive"] }
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "air-beautify"
|
|
||||||
version = "0.1.2"
|
|
||||||
edition = "2021"
|
|
||||||
description = "AIR human-readable format transformer binary"
|
|
||||||
authors = ["Fluence Labs"]
|
|
||||||
license = "Apache-2.0"
|
|
||||||
publish = false
|
|
||||||
keywords = ["fluence", "air", "beautifier"]
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
air-beautifier = { version = "0.1.2", path = "../../../crates/beautifier" }
|
|
||||||
clap = { version = "4.1.8", features = ["derive"] }
|
|
||||||
anyhow = "1.0.69"
|
|
@ -1,19 +1,21 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "air-trace"
|
name = "aquavm-air-cli"
|
||||||
version = "0.2.6"
|
version = "0.2.6"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "AIR performance tracing tool"
|
description = "AIR execution and printing tool"
|
||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
publish = false
|
repository = "https://github.com/fluencelabs/aquavm"
|
||||||
|
documentation = "https://docs.rs/aquavm-air-cli"
|
||||||
keywords = ["fluence", "air", "tracing"]
|
keywords = ["fluence", "air", "tracing"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
air = { version = "0.37.0", path = "../../../air" }
|
aquavm-air = { version = "0.37.0", path = "../../../air" }
|
||||||
air-test-utils = { version = "0.4.5",path = "../../../crates/air-lib/test-utils", optional = true }
|
air-beautifier = { version = "0.1.2", path = "../../../crates/beautifier" }
|
||||||
air-interpreter-interface = { version = "0.12.1", path = "../../../crates/air-lib/interpreter-interface", default-features = false }
|
|
||||||
avm-data-store = { version = "0.6.0", path = "../../../crates/data-store" }
|
avm-data-store = { version = "0.6.0", path = "../../../crates/data-store" }
|
||||||
avm-interface = { version = "0.28.2", path = "../../../avm/interface" }
|
avm-interface = { version = "0.28.2", path = "../../../avm/interface" }
|
||||||
|
air-interpreter-interface = { version = "0.12.1", path = "../../../crates/air-lib/interpreter-interface", default-features = false }
|
||||||
|
air-test-utils = { version = "0.4.4",path = "../../../crates/air-lib/test-utils", optional = true }
|
||||||
|
|
||||||
anyhow = "1.0.69"
|
anyhow = "1.0.69"
|
||||||
clap = { version = "4.1.8", features = ["derive", "env"] }
|
clap = { version = "4.1.8", features = ["derive", "env"] }
|
||||||
@ -25,3 +27,7 @@ tracing-subscriber = { version = "0.3.16", default-features = false, features =
|
|||||||
[features]
|
[features]
|
||||||
default = ["wasm"]
|
default = ["wasm"]
|
||||||
wasm = ["air-test-utils"]
|
wasm = ["air-test-utils"]
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "air"
|
||||||
|
path = "src/main.rs"
|
@ -1,8 +1,18 @@
|
|||||||
# The `air-trace` utility
|
# The `air` CLI utility
|
||||||
|
|
||||||
The main propose of this utility is to run AquaVM with data and analyze its performance. It has two subcommands: `run` and `stats`.
|
The `air` CLI utility is a helper tool for Aqua and AIR developers. It has three subcommands: `beautify`, `run` and `stats`.
|
||||||
|
|
||||||
## `air-trace run`
|
## `air beautify`
|
||||||
|
|
||||||
|
Alias: `air b`.
|
||||||
|
|
||||||
|
This subcommand reads an AIR script from standard input and prints it in human-readable Python-like representation. This representation cannot be executed and is intended to be read by mere mortals.
|
||||||
|
|
||||||
|
It outputs to standard output or a file.
|
||||||
|
|
||||||
|
## `air run`
|
||||||
|
|
||||||
|
Alias: `air r`.
|
||||||
|
|
||||||
Executes an AIR script with data in WASM AquaVM. It has two modes of parameter input: plain and anomaly.
|
Executes an AIR script with data in WASM AquaVM. It has two modes of parameter input: plain and anomaly.
|
||||||
|
|
||||||
@ -12,27 +22,29 @@ All common parameters are optional. Their position is before the mode selector
|
|||||||
+ `--call-results PATH` parameter allows you to provide call results for current execution.
|
+ `--call-results PATH` parameter allows you to provide call results for current execution.
|
||||||
+ `--max-heap-size N` defines maximum heap size for WASM runtime.
|
+ `--max-heap-size N` defines maximum heap size for WASM runtime.
|
||||||
+ `--interpreter PATH` option defines the AquaVM WASM binary to be executed. By default, it is "target/wasm32-wasi/release/air_interpreter_server.wasm", but you can define a global value with the `AIR_INTERPRETER_WASM_PATH` environment variable. The default presumes that the tool is run from the root of this repository. Feel free to use option or environment variable to run from any location.
|
+ `--interpreter PATH` option defines the AquaVM WASM binary to be executed. By default, it is "target/wasm32-wasi/release/air_interpreter_server.wasm", but you can define a global value with the `AIR_INTERPRETER_WASM_PATH` environment variable. The default presumes that the tool is run from the root of this repository. Feel free to use option or environment variable to run from any location.
|
||||||
+ with the `--json` option, tracing info is output (to stderr) in machine-readable JSON format. The output can be later processed with `air-trace stats` subcommand.
|
+ with the `--json` option, tracing info is output (to stderr) in machine-readable JSON format. The output can be later processed with `air stats` subcommand.
|
||||||
+ `--tracing-params` defines tracing logging levels for AquaVM. By default, it is equal to `info` and does trace the most high-level AquaVM constructions (data parsing, AIR script parsing, execution). With `debug` level it traces some individual commands, and with `trace` level it traces even more fine grained functionality, but it induce more overhead.
|
+ `--tracing-params` defines tracing logging levels for AquaVM. By default, it is equal to `info` and does trace the most high-level AquaVM constructions (data parsing, AIR script parsing, execution). With `debug` level it traces some individual commands, and with `trace` level it traces even more fine grained functionality, but it induce more overhead.
|
||||||
+ `--runner-tracing-params` defines tracing logging level for the runner. By default, it is equal to `warn`.
|
+ `--runner-tracing-params` defines tracing logging level for the runner. By default, it is equal to `warn`.
|
||||||
|
|
||||||
The important option is `--native`. It runs the AquaVM as the native code that can be profiled with any native profiler. As input data deserialization and serialization time can be comparable to particle execution time, and short execution times provides less reliable results, one can use `--repeat N` option to repeat particle execution several times. Execution result is not printed in this case, so you may run `--repeat 1` to suppress it.
|
The important option is `--native`. It runs the AquaVM as the native code that can be profiled with any native profiler. As input data deserialization and serialization time can be comparable to particle execution time, and short execution times provides less reliable results, one can use `--repeat N` option to repeat particle execution several times. Execution result is not printed in this case, so you may run `--repeat 1` to suppress it.
|
||||||
|
|
||||||
Run `air-trace run --help` to see all common parameters.
|
Run `air run --help` to see all common parameters.
|
||||||
|
|
||||||
### Plain mode
|
### Plain mode
|
||||||
In the `--plain` mode, the parameters like AIR script path, data path, previous data path and other particle fields can be provided in separate arguments, of which only `--data` is the required one (and AIR script is read from stdin by default).
|
In the `--plain` mode, the parameters like AIR script path, data path, previous data path and other particle fields can be provided in separate arguments, of which only `--data` is the required one (and AIR script is read from stdin by default).
|
||||||
|
|
||||||
Run `air-trace run --plain --help` to see all plain mode options.
|
Run `air run --plain --help` to see all plain mode options.
|
||||||
|
|
||||||
### Anomaly mode
|
### Anomaly mode
|
||||||
In the anomaly mode, the only argument is a path to self-contained anomaly data file obtained from Anomaly Particle Detection System.
|
In the anomaly mode, the only argument is a path to self-contained anomaly data file obtained from `rust-peer`'s Anomaly Particle Detection System.
|
||||||
|
|
||||||
Run `air-trace run --anomaly --help` to see all anomaly mode options.
|
Run `air run --anomaly --help` to see all anomaly mode options.
|
||||||
|
|
||||||
## `air-trace stats`
|
## `air stats`
|
||||||
|
|
||||||
This subcommand allows to process JSON trace collected with `air-trace run --json`. It has two primary options:
|
Alias: `air s`.
|
||||||
|
|
||||||
|
This subcommand allows to process JSON trace collected with `air run --json`. It has two primary options:
|
||||||
|
|
||||||
+ `--pretty` outputs JSON trace in human readable format.
|
+ `--pretty` outputs JSON trace in human readable format.
|
||||||
+ `--stats` outputs execution summary.
|
+ `--stats` outputs execution summary.
|
||||||
@ -41,7 +53,7 @@ By default, both options are effective.
|
|||||||
|
|
||||||
The `--sort-stats-by-duration` flag sorts spans by time, not by name, in the report.
|
The `--sort-stats-by-duration` flag sorts spans by time, not by name, in the report.
|
||||||
|
|
||||||
Please, note that currently tracing outputs to stdout, and execution result is also printed to stdout. You may suppress printing the result with `air-trace run --repeat 1` option.
|
Please, note that currently tracing outputs to stdout, and execution result is also printed to stdout. You may suppress printing the result with `air run --repeat 1` option.
|
||||||
|
|
||||||
## Known limitations
|
## Known limitations
|
||||||
|
|
||||||
@ -49,7 +61,7 @@ Please, note that currently tracing outputs to stdout, and execution result is a
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### AIR interpreter server
|
### AIR interpreter
|
||||||
|
|
||||||
You need the `marine` tool installed. Run following command in the repo's root directory:
|
You need the `marine` tool installed. Run following command in the repo's root directory:
|
||||||
|
|
||||||
@ -57,23 +69,23 @@ You need the `marine` tool installed. Run following command in the repo's root
|
|||||||
marine build --features marine --package air-interpreter --release
|
marine build --features marine --package air-interpreter --release
|
||||||
```
|
```
|
||||||
|
|
||||||
It will output the binary to default `--interpreter` path at `target/wasm32-wasi/release/air_interpreter_server.wasm`; if you wish to run the `air-trace` from arbitrary place, store the `air_interpreter_server.wasm` binary in a cool dry place and set `AIR_INTERPRETER_WASM_PATH` variable.
|
It will output the binary to default `--interpreter` path at `target/wasm32-wasi/release/air_interpreter_server.wasm`; if you wish to run the `air` from arbitrary place, store the `air_interpreter_server.wasm` binary in a cool dry place and set `AIR_INTERPRETER_WASM_PATH` variable.
|
||||||
|
|
||||||
## `air-trace` binary
|
## `air` binary
|
||||||
|
|
||||||
You need to have Rust toolchain and its `cargo` utility installed. Run this command from the repo's root directory:
|
You need to have Rust toolchain and its `cargo` utility installed. Run this command from the repo's root directory:
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
cargo install --path tools/cli/air-trace
|
cargo install --path tools/cli/air
|
||||||
```
|
```
|
||||||
|
|
||||||
## `air-trace` native build
|
## `air` CLI native build
|
||||||
|
|
||||||
You can have fully native or WASM `air-trace` build with the following commands:
|
You can have fully native or pure WASM `air` CLI build with the following commands:
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
cargo build --no-default-features --release -p air-trace
|
cargo build --no-default-features --release -p aquavm-air-cli
|
||||||
cargo build --no-default-features --release -p air-trace --target wasm32-wasi
|
cargo build --no-default-features --release -p aquavm-air-cli --target wasm32-wasi
|
||||||
```
|
```
|
||||||
|
|
||||||
This build doesn't need the AIR interpreter server binary.
|
This build doesn't need the AIR interpreter WASM binary.
|
@ -14,18 +14,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#![forbid(unsafe_code)]
|
|
||||||
#![warn(rust_2018_idioms)]
|
|
||||||
#![deny(
|
|
||||||
dead_code,
|
|
||||||
nonstandard_style,
|
|
||||||
unused_imports,
|
|
||||||
unused_mut,
|
|
||||||
unused_variables,
|
|
||||||
unused_unsafe,
|
|
||||||
unreachable_patterns
|
|
||||||
)]
|
|
||||||
|
|
||||||
use air_beautifier::Beautifier;
|
use air_beautifier::Beautifier;
|
||||||
use anyhow::{Context, Result};
|
use anyhow::{Context, Result};
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
@ -33,7 +21,8 @@ use clap::Parser;
|
|||||||
use std::{io, path::PathBuf};
|
use std::{io, path::PathBuf};
|
||||||
|
|
||||||
#[derive(Parser)]
|
#[derive(Parser)]
|
||||||
struct Args {
|
#[clap(about = "Pretty-print an AIR script to Python-like representation")]
|
||||||
|
pub(crate) struct Args {
|
||||||
#[clap(short, long, default_value_t = air_beautifier::DEFAULT_INDENT_STEP)]
|
#[clap(short, long, default_value_t = air_beautifier::DEFAULT_INDENT_STEP)]
|
||||||
indent_step: usize,
|
indent_step: usize,
|
||||||
#[clap(short, long)]
|
#[clap(short, long)]
|
||||||
@ -72,8 +61,7 @@ fn build_output(args: &Args) -> Result<Box<dyn io::Write>> {
|
|||||||
Ok(output)
|
Ok(output)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> Result<()> {
|
pub(crate) fn beautify(args: Args) -> Result<()> {
|
||||||
let args = Args::parse();
|
|
||||||
let air_script = read_script(&args).context("failed to read the input")?;
|
let air_script = read_script(&args).context("failed to read the input")?;
|
||||||
let output = build_output(&args).context("failed to open the output")?;
|
let output = build_output(&args).context("failed to open the output")?;
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2022 Fluence Labs Limited
|
* Copyright 2023 Fluence Labs Limited
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -26,9 +26,8 @@
|
|||||||
unreachable_patterns
|
unreachable_patterns
|
||||||
)]
|
)]
|
||||||
|
|
||||||
mod run;
|
mod beautify;
|
||||||
mod stats;
|
mod trace;
|
||||||
mod utils;
|
|
||||||
|
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
|
|
||||||
@ -41,14 +40,19 @@ struct Cli {
|
|||||||
#[derive(clap::Subcommand)]
|
#[derive(clap::Subcommand)]
|
||||||
#[allow(clippy::large_enum_variant)]
|
#[allow(clippy::large_enum_variant)]
|
||||||
enum Subcommand {
|
enum Subcommand {
|
||||||
Run(crate::run::Args),
|
#[clap(alias = "b")]
|
||||||
Stats(crate::stats::Args),
|
Beautify(self::beautify::Args),
|
||||||
|
#[clap(alias = "r")]
|
||||||
|
Run(self::trace::run::Args),
|
||||||
|
#[clap(alias = "s")]
|
||||||
|
Stats(self::trace::stats::Args),
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> anyhow::Result<()> {
|
fn main() -> anyhow::Result<()> {
|
||||||
let args = Cli::parse();
|
let args = Cli::parse();
|
||||||
match args.subcommand {
|
match args.subcommand {
|
||||||
Subcommand::Run(args) => crate::run::run(args),
|
Subcommand::Run(args) => self::trace::run::run(args),
|
||||||
Subcommand::Stats(args) => crate::stats::stats(args),
|
Subcommand::Stats(args) => self::trace::stats::stats(args),
|
||||||
|
Subcommand::Beautify(args) => self::beautify::beautify(args),
|
||||||
}
|
}
|
||||||
}
|
}
|
19
tools/cli/air/src/trace/mod.rs
Normal file
19
tools/cli/air/src/trace/mod.rs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2023 Fluence Labs Limited
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
pub(crate) mod run;
|
||||||
|
pub(crate) mod stats;
|
||||||
|
mod utils;
|
@ -14,8 +14,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use super::super::load_data;
|
||||||
use super::ExecutionData;
|
use super::ExecutionData;
|
||||||
use crate::run::load_data;
|
|
||||||
use avm_data_store::AnomalyData;
|
use avm_data_store::AnomalyData;
|
||||||
use avm_interface::ParticleParameters;
|
use avm_interface::ParticleParameters;
|
||||||
|
|
@ -14,8 +14,8 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use super::super::super::utils::unix_timestamp_now;
|
||||||
use super::ExecutionData;
|
use super::ExecutionData;
|
||||||
use crate::utils::unix_timestamp_now;
|
|
||||||
use avm_interface::ParticleParameters;
|
use avm_interface::ParticleParameters;
|
||||||
|
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
@ -44,7 +44,7 @@ pub(crate) struct PlainDataArgs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn load(args: &PlainDataArgs) -> anyhow::Result<ExecutionData<'_>> {
|
pub(crate) fn load(args: &PlainDataArgs) -> anyhow::Result<ExecutionData<'_>> {
|
||||||
use crate::run::load_data;
|
use super::super::load_data;
|
||||||
|
|
||||||
let air_script =
|
let air_script =
|
||||||
read_air_script(args.air_script_path.as_deref()).context("failed to read AIR script")?;
|
read_air_script(args.air_script_path.as_deref()).context("failed to read AIR script")?;
|
@ -14,8 +14,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use super::log_data::{LogKey, LogRecord, Message};
|
use super::super::utils::parse_tracing_duration;
|
||||||
use crate::utils::parse_tracing_duration;
|
use super::log_data::LogKey;
|
||||||
|
use super::log_data::LogRecord;
|
||||||
|
use super::log_data::Message;
|
||||||
|
|
||||||
use std::{collections::HashMap, time::Duration};
|
use std::{collections::HashMap, time::Duration};
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Execute an AquaVM special benchmarking suite and recort results with some meta information to `benches/PERFORMANCE.json` database.
|
Execute an AquaVM special benchmarking suite and recort results with some meta information to `benches/PERFORMANCE.json` database.
|
||||||
|
|
||||||
This script is intended to be run from the project root. It uses the `air-trace` through `cargo`, without installation.
|
This script is intended to be run from the project root. It uses the `air` through `cargo`, without installation.
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ class Bench:
|
|||||||
"cargo", "run",
|
"cargo", "run",
|
||||||
"--quiet",
|
"--quiet",
|
||||||
"--release",
|
"--release",
|
||||||
"--package", "air-trace",
|
"--package", "aquavm-air-cli",
|
||||||
"--",
|
"--",
|
||||||
"run",
|
"run",
|
||||||
"--json",
|
"--json",
|
||||||
|
@ -42,7 +42,7 @@ def _prepare(args):
|
|||||||
])
|
])
|
||||||
logger.info("Build air-trace...")
|
logger.info("Build air-trace...")
|
||||||
subprocess.check_call([
|
subprocess.check_call([
|
||||||
"cargo", "build", "--release", "--package", "air-trace",
|
"cargo", "build", "--release", "--package", "aquavm-air-cli",
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user