enso/app/ide-desktop
Mateusz Czapliński b01217aa69
Allow collection of EnsoGL stats when Monitor panel is not visible (#3260)
This change makes EnsoGL runtime stats be always collected, even when EnsoGL `Monitor` panel is not visible. Those stats are intended to be used in the future by a profiling framework.

**Performance impact:** Continuous collection of stats introduces an overhead of two Web Performance API `now()` calls in each frame of the main rendering loop, plus a small number of simple arithmetic calculations. This is assumed to be a negligible and acceptable overhead.

#### Visuals



A screenshot of the Monitor panel in full `ide` after applying the PR, taken in IDE built with `./run dist`:


<img width="991" alt="Screenshot 2022-02-14 at 16 11 42" src="https://user-images.githubusercontent.com/273837/153891378-8a2fb333-34ce-46ce-99df-7d796817310c.png">

A recording, also in IDE built with `./run dist`; note that FPS is impacted by the act of recording itself:





https://user-images.githubusercontent.com/273837/154104016-49a12e23-1210-4477-9743-ec1611e5b4ed.mov




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

# Important Notes
- Responsibility for controlling how `Stats` gathering and calculation is performed at various points in the main rendering loop was removed from `Monitor` - the `Monitor`'s purpose is only to display existing data, it should not influence how the data is collected.
- Two previously existing distinct `Monitor` structs were merged into one, to avoid confusion; after previous refactorings, the remaining `stats::Monitor` did not have much useful code anyway.
- In `stats` package, refactoring was done, to make `StatsData` a "dumb", data-only type, and to move the logic related to stats collection and frame tracking to other helper types.


[ci no changelog needed]
2022-02-21 12:38:45 +00:00
..
lib Bump Rust toolchain to nightly-2022-01-20. (#3255) 2022-02-16 12:58:02 +00:00
.gitignore Refactor gui/src/rust/ide to two app/gui and app/ide-desktop (#3157) 2021-11-16 10:04:56 +01:00
config.js Refactor gui/src/rust/ide to two app/gui and app/ide-desktop (#3157) 2021-11-16 10:04:56 +01:00
lerna.json Refactor gui/src/rust/ide to two app/gui and app/ide-desktop (#3157) 2021-11-16 10:04:56 +01:00
package-lock.json Allow collection of EnsoGL stats when Monitor panel is not visible (#3260) 2022-02-21 12:38:45 +00:00
package.js Revert "Implement basic performance logging API. (#3169)" 2022-01-14 12:40:28 +00:00