-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wasm] Add AppStart task to the bench Sample #61481
Conversation
Measure browser app start times, 2 measurements implemented. First to measure till the JS window.pageshow event, second to measure time when we reach managed C# code. Example ouput: | measurement | time | |-:|-:| | AppStart, Page show | 108.1400ms | | AppStart, Reach managed | 240.2174ms |
Tagging subscribers to this area: Issue DetailsMeasure browser app start times, 2 measurements implemented. First to measure till the JS window.pageshow event, second to measure Example ouput:
|
@@ -79,7 +89,10 @@ public Result RunBatch(BenchTask task, int milliseconds) | |||
start = DateTime.Now; | |||
for (i = 0; i < steps; i++) | |||
{ | |||
RunStep(); | |||
if (HasRunStepAsync) | |||
await RunStepAsync(); |
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.
Note that the async continuation is probably executed from setTimer(... , 0)
so, if there is work in that scheduler, it may impact measurement. But compared to whole emscripten startup, probably not big problem.
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.
Yeah. I think there should not be much else happening at that time, besides things which are part of the startup.
Not sure whether we can improve that.
Measure browser app start times, 2 measurements implemented.
First to measure till the JS window.pageshow event, second to measure
time when we reach managed C# code.
Example ouput: