Skip to content
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

feat(ci): monitor typescript perf #31757

Merged
merged 5 commits into from
Feb 14, 2022
Merged

feat(ci): monitor typescript perf #31757

merged 5 commits into from
Feb 14, 2022

Conversation

JonasBa
Copy link
Member

@JonasBa JonasBa commented Feb 11, 2022

Cant get the transaction to work and show up in Sentry correctly + there is not support for custom measurements yet. We can start by monitoring just the entire duration (timestamp - startTimestamp) and progressively add the measurements. Will need some help from SDK or someone from performance team to figure out why it's not being ingested.

asked for --diagnostic clarification in microsoft/TypeScript-wiki#293

@JonasBa
Copy link
Member Author

JonasBa commented Feb 14, 2022

Got it setup and working, thanks @k-fish for help!

@JonasBa
Copy link
Member Author

JonasBa commented Feb 14, 2022

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost about to ask where the typescript types were before I saw .js 🤦

This is super exciting! Looking forward to the blog post 😄

'typescript.memory.used': {value: memoryUsage.value},
});

transaction.finish();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feel weird to me (even though I totally get it). It's a consequence of spans not being indexed, so even if the "right" solution is to have values like typescript.time.check as measurements, I feel like they should be child spans we add to the transaction. I guess part of me just wants to see the transaction waterfall with all the ts timing spans in all it's glory :)

Setting a transaction duration might be nice though! (idk if you have to adjust with performance.now())

Suggested change
transaction.finish();
transaction.finish(totalTime.value);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AbhiPrasad 100%, I would want each compiler step to be a span, but since we are hacking it right now, it'll have to do. I wonder if the tsc compiler exposes some hooks that we could plug into if we called it programatically. I'll investigate.

I'll add the total duration :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried adding the start/end timestamps, but couldn't get the transactions to show up in the dashboard. Sent output to @AbhiPrasad and going to merge this as is - I'm happy to add them back later :)

@@ -0,0 +1,126 @@
/* eslint-env node */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have node-ts, any reason we couldn't have written this as a typescript script?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evanpurkhiser I did not know we had it. I just looked at the other script in the gh folder. I'll make a PR to update it

@github-actions github-actions bot locked and limited conversation to collaborators Mar 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants