-
Notifications
You must be signed in to change notification settings - Fork 584
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
Track js compilation time #9794
Conversation
@@ -213,6 +213,7 @@ namespace pxt.runner { | |||
|
|||
function initInnerAsync() { | |||
pxt.setAppTarget((window as any).pxtTargetBundle) | |||
pxt.analytics.enable(pxt.Util.userLanguage()); |
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.
Not sure about this change? We have other ticks coming in so feels unexpected to have to change this, enableAnalytics
call should be getting in thru here https://github.com/search?q=repo%3Amicrosoft%2Fpxt%20analytics.enable&type=code
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.
If I don't include this line, the tickEvents
do not make it to Application Insights. See how there are only share.isMultiplayer
ticks most recently where I commented out this line? Whereas in around 3:04pm I had still had this line enabled and we get the same events mixed in with the new runner
events.
pxt.analytics.enable(pxt.Util.userLanguage()); | |
pxt.analytics.enable(pxt.Util.userLanguage()); |
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.
Adding @thsparks. I have observed that pageview ticks stopped flowing recently as well.
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.
@jwunderl There are five files where pxt.analytics.enable
are called in the linked you provided:
- Kiosk does not apply in this case since I tested it by opening a share-page after running Arcade locally.
- I don't believe the share page loads the web app, so telemetry should not be enabled via that route. Though if I'm incorrect, please let me know!
- Multiplayer page separately enables telemetry, but that does not apply here.
- Same with the teachertool page.
I can see that argument that if do enable additional telemetry for share pages, then we should match what we've done before in these other examples that you've linked.
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.
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.
👍
* Before compiling, try to fetch built js from backend (#9778) * Track js compilation time (#9794) --------- Co-authored-by: Eric Anderson <[email protected]>
Enables telemetry in
runner.ts
to track the time it takes to either download the compiled JS or download and compile the text. These events will help know the impact the pre-compilation step is having.Validation
Ran pxt-arcade locally with a local
pxt
on this branched linked. I then changed the InstrumentationKey in apptracking.html and tracking.html to the PPE app insights instance.runner.fetchSimJsInfo
event was present.runner.buildSimJsInfo
event was present.Both these links are the same game just shared twice. For the first one I precompiled the JS to the
fetchSimJsInfo
event would be recorded. After loading each page five times in a new icognito tab each time here is what I found: