183 Commits

Author SHA1 Message Date
Valery Antopol
52f0390eb8
Update marine-rs-sdk to 0.7.0 to fix memory leak (#287) 2022-07-27 16:40:27 +03:00
Ivan Boldyrev
7d46ae914d
Introduce tracing_benches.sh script (#285)
It accepts two arguments: `big`/`long` test type and `merge`/`nomerge`
test subtype.  Any of arguments can be replaced with `--all` value.
2022-07-15 22:14:08 +07:00
Ivan Boldyrev
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
Ivan Boldyrev
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
Ivan Boldyrev
090eceef85
Get rid of unconditional logging code (#276)
The `log_instruction` macro unconditionally pre-formatted some string to
be logged, even if logging is disabled, making whole AquaVM very slow.

After getting it fixed, native execution time dropped from 5sec to
thousands of milliseconds.
2022-06-22 16:25:22 +07:00
Ivan Boldyrev
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
Ivan Boldyrev
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
Ivan Boldyrev
1c70a3d17d
Make clippy happier by resolving some warnings (#271)
1. Use $crate inside macros.
2. Remove unused lifetime.
3. Use write! instead of String::push_str + format! to reduce allocation.
2022-05-31 18:44:45 +07:00
Mike Voronov
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
Ivan Boldyrev
dbd42cdf3d Fix Display of Fail::Literal
The error message was displayed without quotes.
2022-05-17 15:35:37 +07:00
Ivan Boldyrev
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
Valery Antopol
74ddf26b6a
update faas (#259) 2022-04-26 16:54:24 +03:00
Valery Antopol
298d796c09
update faas & app-service (#257) 2022-04-26 13:12:10 +03:00
Mike Voronov
3f510e1581
Improve scope error handling (#251) 2022-04-21 18:01:06 +03:00
Mike Voronov
7e0c87d72a
Introduce %ttl% (#253) 2022-04-21 11:44:18 +03:00
Mike Voronov
490791b177
introduce %timestamp% (#250) 2022-04-20 23:05:37 +03:00
Mike Voronov
69a42cf111
Introduce new for non iterable scalars (#248) 2022-04-20 11:43:46 +03:00
Mike Voronov
06d275ea16
Improve non iterable scalar scoping (#243) 2022-04-15 22:25:03 +03:00
Mike Voronov
b29883e990
Refactor tests (#231) 2022-03-10 16:06:43 +03:00
Mike Voronov
914ad74516
Make fold by streams truly deterministic (#228) 2022-03-10 01:32:07 +03:00
Mike Voronov
a64a4fc0a6
support empty array literal in fold (#230) 2022-03-07 13:50:08 +03:00
Mike Voronov
c00b453a48
Remove RefCell from streams (#227) 2022-03-03 19:09:48 +03:00
Mike Voronov
9ae79f44ff
bump version to 0.21 (#226) 2022-02-26 00:54:11 +03:00
Mike Voronov
cc54e4c383
Introduce recursive streams (#225) 2022-02-25 23:55:40 +03:00
Mike Voronov
ac050abc8a
Fix ap trace handler behaviour (#224) 2022-02-25 10:24:28 +03:00
Mike Voronov
78a2bc9d58
Fix tetraplets json path (#220) 2022-02-18 18:00:42 +03:00
Mike Voronov
1ca121cf93
fix data handling in Ap (#217) 2022-02-17 13:37:36 +03:00
Mike Voronov
9fb085b6d6
Check call arguments at the beggining (#215) 2022-02-16 23:34:15 +03:00
Mike Voronov
4f90f194c7
Implement scalars in lambda for streams (#212) 2022-01-26 17:16:59 +03:00
Mike Voronov
6df4e470d3
Bump AquaVM to 0.20.0 (#208) 2021-12-29 21:24:03 +03:00
Mike Voronov
401d8c06fa
Fix bug with empty arrays in match (#207) 2021-12-29 20:01:49 +03:00
Mike Voronov
e6193ea4de
Implement fail with scalars (#205) 2021-12-29 19:51:18 +03:00
Mike Voronov
63160dd0f0
Refactor last error (#202) 2021-12-28 16:59:55 +03:00
Mike Voronov
c1ff7c0688
Print instruction on trace errors (#201) 2021-12-26 22:52:00 +03:00
Mike Voronov
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
Mike Voronov
8dbae91bda
Introduce fail instruction (#196) 2021-12-16 21:34:27 +03:00
Mike Voronov
5ef8bfc940
Add variables names in resolve errors (#194) 2021-12-15 17:39:26 +03:00
Mike Voronov
1d8182d497
Support scalars in lambda (#192) 2021-12-15 12:46:09 +03:00
Mike Voronov
d300c8b2fc
Improve subtrace len compute algo (#186) 2021-12-03 14:29:03 +03:00
Mike Voronov
fbbe28c5b2
Cleanup fold iterable while exception (#185) 2021-12-02 14:44:10 +03:00
Mike Voronov
c5c9aefa37
Add test for issue 177 (#183) 2021-11-29 18:35:11 +03:00
Mike Voronov
cf278bbd4c
Track previous call state after join behaviour (#182) 2021-11-29 18:28:57 +03:00
Mike Voronov
e95f252be5
Refactor join behaviour and par subtree completeness (#181) 2021-11-26 14:44:21 +03:00
Mike Voronov
e13377c5b0
Add test for par ap behaviour (#175) 2021-11-24 18:47:49 +03:00
Mike Voronov
d75be8f9ea
make apply(_with_tetraplets) always return only one value (#174) 2021-11-24 18:31:20 +03:00
Mike Voronov
5cd45385b4
Introduce restriction operator for streams (#172) 2021-11-24 17:57:14 +03:00
Mike Voronov
9f47eb9b83
Refactor AIR parser (#168) 2021-11-12 14:12:50 +03:00
Mike Voronov
a19eba6bec
Change preparation error mapping (#170) 2021-11-10 16:07:01 +03:00
Mike Voronov
c3e149f8a2
Bump AVM server version (#167) 2021-11-04 20:05:20 +03:00