Commit Graph

109 Commits

Author SHA1 Message Date
0c387f7415 Adjust air-trace options (#289)
1. Introduce --runner-tracing-params for enable and disable tracing of runner.
2. Adjust some function's tracing levels to make default traces less noisy.
2022-08-04 20:51:54 +07:00
52f0390eb8 Update marine-rs-sdk to 0.7.0 to fix memory leak (#287) 2022-07-27 16:40:27 +03:00
0eb37800b6 AquaVM benchmarks (#283)
* Fix stale benchmarks
* Data (de)serialization and execution benchmarks:

Two kind of benchmark: relatively short, but with huge call results, and
long trace of small call results.  Moreover, there are two case for each:
with same data to be merged with comparison, and data from different
par branches merged w/o comparison.
2022-07-08 21:07:04 +07:00
c3cea695c8 air-trace util for measuring AquaVM performance with tracing crate.
`air-trace run` subcommand allows to run AquaVM on any data, it allows to define most AquaVM inputs, providing defaults for most of them, and sets up either human-readable or JSON tracing output, the latter can be later processed by `air-trace stats`.

Anomaly data input is also supported, that is useful for slow data investigation.

Native execution mode can be used for native profiling.  Please note, however, that current version cannot be built natively on Apple Sillicon processor yet, as invariably depends on the `avm-server` because of leaking types that should be refactored or hidden.  The `--repeat` option can repeat the execution several times for the execution to dominate on input data reading and output.

High-level or rare calls have "info" trace level, instructions are "debug", and sub-instruction calls are "tracing".  Over-detailed tracing can induce overhead that spoils timing data.
2022-07-07 18:44:58 +07:00
4acfb19e08 Add AIR script to the AquaVM's anomaly data (#280)
Save AIR script to AnomlalyData struct.

Increments versions of `avm-data-store` to 0.3.0 and `avm-server` to 0.22.0.
2022-06-30 16:26:37 +07:00
0bdd573de7 Enable derive serde feature for data-store crate (#278) 2022-06-23 15:57:57 +03:00
3a84ceb863 Add API to save anomaly data (#277)
This PR adds two new methods in DataStore to determine anomaly and collect necessary data. Additionally
    - a generic parameter of DataStore turned to be associative
    - AVMOutcome contains additionally memory_delta and execution_time
2022-06-23 15:24:00 +03:00
6df2b9d084 Introduce TracePos type for trace positions (#273)
Many internal structures refer to trace positions; this is an important type of values. In the code, it is sometimes `u32`, sometimes `usize`. While such variables usually have "_pos" suffix, having a dedicated type does improve code with type guarantees.
2022-06-10 12:29:56 +07:00
e0f6fa1b4d Run tests with sanitizers (#274)
As `wasm32-wasi` target doesn't seem to support sanitizers, we are to
execute tests with native code.  The feature `test_with_native_code` is
introduced for that.

Closes #247.
2022-06-10 12:28:40 +07:00
56609c276f Set an empty subtrace on a fold lore absent in trace (#270)
In the `FoldFSM` and related functions.

Closes #222
2022-06-01 22:00:05 +07:00
1c0ff2c979 air-beautifier lib and air-beautify binary (#266)
The `air-beautify` util takes an AIR script input with Lisp-like syntax
and transforms it into experimental indentation-based syntax.

Closing #184.
2022-05-20 21:07:22 +07:00
3c23ab735c Refactor call triplets (#269)
Older grammar allowed some variabilty in triple format.  Now, the only
format allowed is:

  `peer_id (service_id function_name)`

As less errors can happen during parsing of the triplet, the code was
simplified further .

Closes #267.
2022-05-19 19:59:08 +07:00
vms
99d7aa0d93 Fix Display impl for next 2022-05-19 09:53:32 +03:00
24f0d66bed Rename subtree to subgraph (#265)
Intially, a fold instruction was designed based on idea that its iterable can't expand,
so AIR was considered as a subtree. But after introducing recursive streams in #225, it's
no more a subtree, but a subgraph.
2022-05-17 15:53:33 +03:00
dbd42cdf3d Fix Display of Fail::Literal
The error message was displayed without quotes.
2022-05-17 15:35:37 +07:00
ec3d3a4e6f Fix Display of Value::LastError with lambda
There was a small typo in the `fn display_last_error`.

Closes #263
2022-05-17 12:57:27 +07:00
dcfa51c756 Use pooled AVMRunner for tests
Use pooled `avm::server::AVMRunner` instances of
air_iterpreter_server.wasm to reduce tests' running time.  It avoids
repeated WASM loading and compilation.

On my hardware, `cargo test --release` execution time (precompiled)
decreases from almost 6 minutes to 1.5 minutes.
2022-05-16 13:16:28 +07:00
7e0c87d72a Introduce %ttl% (#253) 2022-04-21 11:44:18 +03:00
490791b177 introduce %timestamp% (#250) 2022-04-20 23:05:37 +03:00
69a42cf111 Introduce new for non iterable scalars (#248) 2022-04-20 11:43:46 +03:00
06d275ea16 Improve non iterable scalar scoping (#243) 2022-04-15 22:25:03 +03:00
b29883e990 Refactor tests (#231) 2022-03-10 16:06:43 +03:00
a64a4fc0a6 support empty array literal in fold (#230) 2022-03-07 13:50:08 +03:00
cc54e4c383 Introduce recursive streams (#225) 2022-02-25 23:55:40 +03:00
ac050abc8a Fix ap trace handler behaviour (#224) 2022-02-25 10:24:28 +03:00
f994ce73c8 Check scalars in lamda were defined in script (#218) 2022-02-17 23:39:01 +03:00
58aef82b1e Add API for returning interpreter memory size (#210) 2022-01-26 13:37:22 +03:00
e6193ea4de Implement fail with scalars (#205) 2021-12-29 19:51:18 +03:00
63160dd0f0 Refactor last error (#202) 2021-12-28 16:59:55 +03:00
c1ff7c0688 Print instruction on trace errors (#201) 2021-12-26 22:52:00 +03:00
f69b5aa728 Refactor execution errors (#198) 2021-12-21 11:37:35 +03:00
vms
54e383cdaf introduce farewell step; reafactoring 2021-12-17 22:02:16 +03:00
8dbae91bda Introduce fail instruction (#196) 2021-12-16 21:34:27 +03:00
1d8182d497 Support scalars in lambda (#192) 2021-12-15 12:46:09 +03:00
9f91d3161f bump fluence-faas version (#193) 2021-12-14 14:01:57 +03:00
1141c8e42a Fix empty array parsing in match/mismatch instructions (#190) 2021-12-13 15:54:10 +03:00
d300c8b2fc Improve subtrace len compute algo (#186) 2021-12-03 14:29:03 +03:00
fbbe28c5b2 Cleanup fold iterable while exception (#185) 2021-12-02 14:44:10 +03:00
c5c9aefa37 Add test for issue 177 (#183) 2021-11-29 18:35:11 +03:00
e13377c5b0 Add test for par ap behaviour (#175) 2021-11-24 18:47:49 +03:00
5cd45385b4 Introduce restriction operator for streams (#172) 2021-11-24 17:57:14 +03:00
9f47eb9b83 Refactor AIR parser (#168) 2021-11-12 14:12:50 +03:00
d9f10cb26d Deduplicate SecuityTetraplet with marine-rs-sdk (#164) 2021-11-04 16:59:05 +03:00
1c55d34981 Use custom logic for lambda instead of json path (#154) 2021-10-18 23:23:30 +03:00
4251a36842 decouple instruction tracker to a separate crate (#160) 2021-10-15 14:26:46 +03:00
f291c77d26 Update crate info; housekeeping (#153) 2021-10-05 20:08:10 +03:00
e99c352a95 Decouple log targets to a separate crate (#152) 2021-10-05 16:55:04 +03:00
adba9e8e65 Decouple trace handler (#150) 2021-10-05 14:07:38 +03:00
37ed77cb81 Bump versions, add description for data-store (#148) 2021-10-04 18:54:07 +03:00
4a4fc0889b Make interpreter async (#130)
Co-authored-by: folex <0xdxdy@gmail.com>
Co-authored-by: Pavel Murygin <pavel.murygin@gmail.com>
2021-10-04 10:58:00 +03:00