Add ReactVersion to SchedulingProfiler render scheduled marks #36
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.
Summary
These
SchedulingProfiler
marks are currently being used by our experimental concurrent mode profiler tool.Context: Brian at #5 (comment):
We only add version strings to the render scheduled marks as these marks do not appear often and would thus provide the profiler with information it needs without unnecessarily bloating the profiles.
There is a known limitation to this approach: because renders are not scheduled often (generally only on page load), it is possible to generate profiles that do not contain React version numbers. Ideally, we'd want to log
ReactVersion
when we detect the start of a profiling session, but as far as we can tell this is currently not possible without integrating with Chrome DevTools.Resolves #35, and unblocks MLH-Fellowship/scheduling-profiler-prototype#73
Test Plan
yarn test
: tests forSchedulingProfiler
have been updated. The new render scheduled marks look like this:--schedule-render-1-17.0.0-alpha.0
.