Commit Graph

31 Commits

Author SHA1 Message Date
Wojciech Daniło
ccaf24877f
Updating paste macro usage (#3334) 2022-03-22 11:43:14 +01:00
Kaz Wesley
a87b2021a3
Profiling application details (#3332)
* Profiling application details

Add enough profiling to account for every missed frame during startup.

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

* Build ActiveInterval hierarchy in profiler_data

* update doctests / await_!

* docs/formatting/naming

* more graph modes

* increase WASM size

Due to new render-profile-flamegraph scene. We should remove these from the main release WASM blob one way or another.

* lint

* fix a test

* Organization (feedback)

* Add @wdanilo to Cargo.lock CODEOWNERS

As discussed after my previous PR got stuck waiting for Cargo.lock review.

* fix doctests

* Update docs. Removed a limitation.
2022-03-21 11:09:56 -07:00
Ilya Bogdanov
11dfd7bfc9
Return creating node with (+) button & fix a regression (#3338)
* Creating a new node with the (+) button (#3278)

[The Task](https://www.pivotaltracker.com/story/show/180887253)

A new (+) button on the left-bottom corner appeared. It may be clicked to open searcher in the middle of the scene, as an alternative to tab key.

https://user-images.githubusercontent.com/3919101/154514279-7972ed6a-0203-47cb-9a09-82dba948cf2f.mp4

* The window_control_buttons::common was extracted to separate crate `ensogl-component-button` almost without change.
* This includes a severe refactoring of adding nodes in general in the Graph Editor. The whole responsibility of adding new nodes (and starting their editing) was moved to Graph Editor - the Project View only reacts for GE events to show searcher properly.
* The status bar was moved from the bottom-left corner to the middle-top of the scene. It does not collide with (+) button, and plays "notification" role anyway.
* The `interface` debug scene was buggy. The problem was with one expression's span-tree. When I replaced it, the scene works.
* I've removed "new searcher" API, as it is completely outdated.
* I've changed code owners of integration tests to GUI team, as it is the team writing mostly the integration tests (int rust)

* Fix regression #181528359

* Add docs & remove unused function

* Fix & enable native Rust tests

* Fix formatting

Co-authored-by: Adam Obuchowicz <adam.obuchowicz@enso.org>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-16 21:02:47 +03:00
Kaz Wesley
348abdb680
Generate reports about profiling results of top-level sections of the application. (#3306) 2022-03-15 03:12:39 +01:00
Wojciech Danilo
2427605320 Init 2022-03-10 04:47:00 +01:00
Ilya Bogdanov
31be7c8b9a
Revert "Adding new node with (+) button" (#3328)
[ci no changelog needed]

This PR reverts commit [0836ce741d](0836ce741d) because of the spotted regression:

To reproduce:
1. Open a default project.
2. Without doing anything else, cmd + click on any node to edit it.
3. Abort editing by pressing escape.
4. Top-most node disappears (it is actually removed from scene)
If you start editing the bottom node - you will also see a visible regression in node searcher's position.

See thread https://discord.com/channels/401396655599124480/950730235719065620/950731247909478410 for details.
2022-03-09 11:44:39 +00:00
Wojciech Daniło
f4d236fcd4
EnsoGL context abstraction (#3293) 2022-03-04 15:13:23 +01:00
Michael Mauderer
d3cc2c1025
Flame Graph for Profiling Data (#3297)
Add an API to create a flame graph from profiling data. Also adds a demo scene showcasing the functionality that generates some profiling data by measuring dummy function calls and rendering a flame graph for the dummy data (see video for the result).

Not that the functionality is not yet exposed user-facing in the GUI itself, but only as API and demo scene, therefore [ci no changelog needed]

https://user-images.githubusercontent.com/1428930/155118977-ecac0628-777c-48bd-9aa7-30ee6aef1976.mp4

# Important Notes
* Change from the initial design: labels are shown on the flame graph instead of as a tooltip. This is because tooltips are currently only implemented in the graph editor and would require some additional refactoring (probably taking the better part of a day).
* re-instated the behaviour that logs are shown in the JS console if development mode is active.
2022-03-03 22:23:27 +00:00
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
0836ce741d
Creating a new node with the (+) button (#3278)
[The Task](https://www.pivotaltracker.com/story/show/180887253)

A new (+) button on the left-bottom corner appeared. It may be clicked to open searcher in the middle of the scene, as an alternative to tab key.

https://user-images.githubusercontent.com/3919101/154514279-7972ed6a-0203-47cb-9a09-82dba948cf2f.mp4

# Important Notes
* The window_control_buttons::common was extracted to separate crate `ensogl-component-button` almost without change.
* This includes a severe refactoring of adding nodes in general in the Graph Editor. The whole responsibility of adding new nodes (and starting their editing) was moved to Graph Editor - the Project View only reacts for GE events to show searcher properly.
* The status bar was moved from the bottom-left corner to the middle-top of the scene. It does not collide with (+) button, and plays "notification" role anyway.
* The `interface` debug scene was buggy. The problem was with one expression's span-tree. When I replaced it, the scene works.
* I've removed "new searcher" API, as it is completely outdated.
* I've changed code owners of integration tests to GUI team, as it is the team writing mostly the integration tests (int rust)
2022-02-24 16:01:54 +00:00
Adam Obuchowicz
9d6f9373f9
Add tests for debug mode and zoom restriction. (#3289)
This PR adds integration tests created during acceptance process of [181181159](https://www.pivotaltracker.com/story/show/181181159) and [181181203](https://www.pivotaltracker.com/story/show/181181203).

The PRs for those tasks were merged, because I hadn't realized they should not.

Additionally, as the `wasm-bindgen` version was bumped, I extended the timeout of integration tests and made them headless.
2022-02-22 16:43:37 +00:00
Michael Mauderer
32cfb0333a
Bump Rust toolchain to nightly-2022-01-20. (#3255) 2022-02-16 12:58:02 +00:00
Mateusz Czapliński
593a603582
Revert "Add code allowing calculation of EnsoGL stats summaries (#3252)" (#3268)
This reverts commit e69e8078c3.

The removed code (stats aggregation and `stats` demo scene) will not be needed by the profiling framework, as discussed on chat.

(reverts changes introduced as part of https://www.pivotaltracker.com/story/show/181093920)
2022-02-11 15:23:46 +01: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
Ilya Bogdanov
1daf1db56e
Support source maps for JS-based visualizations (#3208) 2022-01-11 15:31:43 +03:00
Michael Mauderer
178cfb0404
Implement basic performance logging API. (#3169) 2021-12-31 21:14:02 +01:00
Adam Obuchowicz
567ddd701c
Developers should find the ide-gui controller codebase logical and easy to work with. (#3188) 2021-12-15 13:40:14 +03: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ł Wawrzyniec Urbańczyk
848cef7dca
Use libraries merged from rust-lib directly (#3137) 2021-11-05 16:55:55 +01:00
Michał W. Urbańczyk
7648deb492 single wprkspace, update ci 2021-10-30 15:04:07 +02:00
Radosław Waśko
db537bf0a8
Add some tweaks to the native builds (#1779) 2021-06-15 10:13:22 +01:00
Ara Adkins
48bcebc723
Update to GraalVM 21.1.0 (#1738) 2021-05-14 13:08:39 +01:00
Dmitry Bushev
2515721799
Add API for dataflow errors (#1422) 2021-01-25 14:41:20 +00:00