This repository has been archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
feat(Provider): Rendering performance telemetry #2079
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
miroslavstastny
requested review from
dvdzkwsk,
layershifter,
levithomason and
mnajdova
as code owners
October 31, 2019 13:13
miroslavstastny
changed the title
feat(Provider): Measure rendering performance stats
feat(Provider): Rendering performance stats
Oct 31, 2019
miroslavstastny
commented
Nov 6, 2019
miroslavstastny
commented
Nov 6, 2019
levithomason
reviewed
Nov 6, 2019
levithomason
approved these changes
Nov 6, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let move the telemetry counting to the Telemetry class per discussion. Also, add an msAvg
getter for ease of use.
Discussed offline, we'll do this later. Let's get the first version rollin'. |
miroslavstastny
changed the title
feat(Provider): Rendering performance stats
feat(Provider): Rendering performance telemetry
Nov 6, 2019
levithomason
pushed a commit
that referenced
this pull request
Nov 9, 2019
* feat(Provider): Measure rendering performance stats * - reset, enable, disable stats * - rename PerformanceStats to Telemetry * add min and max per component * update changelog
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add rendering performance telemetry to understand how much time the application spends rendering Stardust components.
How to use
Add
telemetryRef
prop to theProvider
:Stardust immediately starts measuring performance of all components inside that
Provider
(including nestedProvider
s).To enable/disable the telemetry, set enabled property:
To reset the data gathered so far, call
reset()
:Gathered data are available in performance:
Example output:
Implementation
Most of the rendering time is spent inside
renderComponent
function.This PR adds markers to that function to measure the time spent inside that per-component name.