Commit Graph

81 Commits

Author SHA1 Message Date
Kaz Wesley
a3914f33c1
API for storing metadata (#3291)
API for storing metadata.

See: https://www.pivotaltracker.com/story/show/181149277

# Important Notes
**New APIs**:
- Storing metadata is implemented with `profiler::MetadataLogger`.
- A full metadata storage/retrieval example is in [the top-level doctests](https://github.com/enso-org/enso/blob/wip/kw/profiling-metadata-api/lib/rust/profiler/data/src/lib.rs) for profiler::data, a crate which implements an API for profiling data consumers (it abstracts away the low-level details of the event log, and checks its invariants in the process) [after review of this new API here I'll open a PR to add it to the design doc].

**Implementation**:
- `profiler::Event` is parameterized by a metadata type, so that different types of metadata can be dependency-injected into it.
- A data consumer defines its metadata type as an enum of all the kinds of metadata it is interested in.
- Producing the metadata enum is accomplished without defining its type (which would require dependencies from around the app): A `MetadataLogger` internally use a serialization helper `Variant` to serialize its variant of the metadata enum without knowledge of the other possible variants.

**Performance impact**: still in the low ns/measurement range, comparable to pushing to a vec.

*Note*: `LocalVecBuilder` is currently present under the name `Log`, which is accurate but probably too overloaded. I'd like to find the right name for it, document it with examples, and move it to its own crate under data-structures, but I don't want doing that to hold up this PR.
2022-02-28 09:55:56 +00:00
Adam Obuchowicz
c68ac5c0d6
Integration Test Framework (#3257) 2022-02-11 13:19:02 +01:00
Kaz Wesley
b0b035e73d
Profiling framework: core performance-logging implementation (#3238)
* profiling instrumentation

* Support native testing with mock impl of `mod js`

* Add benchmarks

* Wrapper: support methods.

* `#[profile]`: work in any context

* feature-gate lineno info that breaks IDE

* Support async; more docs; add perf analysis

* docs & formatting
2022-02-10 09:24:29 -08:00
Mateusz Czapliński
e69e8078c3
Add code allowing calculation of EnsoGL stats summaries (#3252)
This change adds utility code for calculating summaries from multiple samples (snapshots) of EnsoGL runtime stats values.

This internal feature is expected to be used by Enso IDE performance profiling tools, which are planned to be added in the near future.

https://www.pivotaltracker.com/story/show/181093920

A demo scene named `stats` was added, showcasing how to perform calculations using the new tools. Currently, the summary calculations in the scene work only when the EnsoGL stats Monitor Panel is visible; this is planned to be improved in a future task (https://www.pivotaltracker.com/story/show/181093601).

 - Note: the stats aggregation code is intended to be later used in Enso IDE's main rendering loop, so it needs to have very good performance characteristics. 
     - Due to that, `Accumulator` was designed to only use simple addition arithmetic, and be constant-memory once created.
2022-02-08 14:58:46 +01:00
Michael Mauderer
5c525daefe Revert "Implement basic performance logging API. (#3169)"
This reverts commit 178cfb0404.
2022-01-14 12:40:28 +00:00
Michael Mauderer
178cfb0404
Implement basic performance logging API. (#3169) 2021-12-31 21:14:02 +01:00
Ilya Bogdanov
73abebf7aa
Add Root View and Welcome Screen View (#3164) 2021-11-30 16:23:46 +01:00
Adam Obuchowicz
99b0c46d87
While testing, developers should not have to wait for each crate to be re-built. (#3168)
Split all the EnsoGL components, examples and debug scenes to separate crates, so the work on the single component should be quicker than before.
2021-11-30 12:27:50 +01:00
Adam Obuchowicz
9ab4f45e72
Refactored enso-data crate and text utilities. (#3166) 2021-11-25 11:45:42 +01:00
Adam Obuchowicz
bb3b145af5
Refactor gui/src/rust/ide to two app/gui and app/ide-desktop (#3157) 2021-11-16 10:04:56 +01:00
Adam Obuchowicz
753f787a6f
Refactored config crate + moving crates to lib/rust directory. (#3155) 2021-11-12 13:56:23 +01:00
Adam Obuchowicz
942464cbaf
Refactoring: merge utils into prelude; merge workspaces. (#3151) 2021-11-10 14:36:08 +01:00
Michał W. Urbańczyk
7648deb492 single wprkspace, update ci 2021-10-30 15:04:07 +02:00
Ara Adkins
4cc36e8c81
Preparation for more parser work (#1363) 2020-12-18 14:25:30 +00:00
Ara Adkins
e5695e6f5d
Complete the implementation of the Enso lexer (#1177) 2020-10-30 14:06:24 +00:00
Ara Adkins
f00b187438
Extract common libraries to rust-lib (#1191) 2020-10-06 10:54:30 +01:00
Radosław Waśko
044a0fa664
Implement Launcher Self-Update (#1125) 2020-09-09 15:37:26 +02:00
Ara Adkins
e64c0384b0
Implement part of the Enso lexer in rust (#1109) 2020-08-27 13:27:22 +01:00
Josef
5345bdcb3e
Stub Out the Parser Interface (#1065) 2020-08-14 11:10:52 +02:00
Ara Adkins
43f7b838f9
Implement code generation for the flexer (#1058) 2020-08-13 13:23:01 +01:00
Josef
cf79d99f3f
Create a stub AST for the parser (#1019) 2020-07-22 12:45:08 +01:00
Josef
9fcd4e2f3a
Add a lazy input reader for flexer (#1014) 2020-07-21 16:25:02 +01:00
Josef
f068509b2e
Automate the Rust Code Generation (#990) 2020-07-15 11:29:13 +02:00
Ara Adkins
919ffbdfac
Refactor the crate structure (#967) 2020-07-03 14:42:45 +01:00
Ara Adkins
f7d4ef546a
Prepare the repo for working on rust code (#841) 2020-06-16 17:18:11 +01:00
Ara Adkins
96eee6ac1a
Remove unnecessary holdout from rust 2020-03-11 11:12:16 +00:00
Michał Wawrzyniec Urbańczyk
175212bf4c
File Manager Client Libary for Rust (#454)
ref #423
2020-01-25 02:38:59 +01:00
Michał Wawrzyniec Urbańczyk
dbecb2c871
JSON-RPC Client Support Library for Rust (#429)
This PR adds `json-rpc` crate — a library facilitating writing clients using JSON-RPC 2.0 protocol.

This library is meant to be used in implementation of File Manager and, in future, of Language Server clients.

The library is agnostic about `Transport` — but the interface has been designed in compliance with web-sys websockets, as this will be primary platform. 

The RPC clients implemented on top of this library are expected to provide Future-based asynchronous API.

Client is designed to work in a single-thread environment,

Implements #426.
2020-01-18 03:45:38 +01:00
Michał Wawrzyniec Urbańczyk
e51a06e263
Initial Rust AST implementation (#348)
AST lives in `ast` package, that relies significantly on `ast-macros` to generate boilerplate.
Additional `macro-utils` library was split out from `shapely-macros` and `ast-macros`.

The implementation was contributed by @wdanilo , I basically just did some refactoring, documenting and testing.

### Important Notes
* AST is known to be incomplete structurally, finishing it is #336 
* AST is missing a number of necessary functions, some of them explicitly marked as FIXME in the code, finishing them is #338 
* while I have written some tests, they are not yet part of CI — I want to this smart way (i.e. allowing tests that rely on parser), it is tracked as #340 
* AST JSON serialization is incompatible with Scala, solving this is #297 
* there is some non-deterministic issue with CI on Windows — I need to look into this closer but it seems to not be related to any Rust parts
2019-11-22 15:21:18 +01:00
Michał Wawrzyniec Urbańczyk
d1796345a4
The prelude library, coming from basegl, in preparation for AST. (#342) 2019-11-19 22:26:54 +01:00
Michał Wawrzyniec Urbańczyk
6078b54f50
Wrapping parser for Rust (#325)
* deriving JSON Encoder for Scala AST types
* websocket-based Parser Service
* wrapper for Parser in Rust that includes client for Parser Service
2019-11-18 14:12:16 +01:00