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

Create TypeScript compilation benchmark that we run automatically on PRs #11616

Merged
merged 4 commits into from
Apr 4, 2022

Conversation

vkarpov15
Copy link
Collaborator

Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory.

If you're making a change to documentation, do not modify a .html file directly. Instead find the corresponding .pug file or test case in the test/docs directory.

Summary

Issues like #10349 make me anxious about merging TS changes, because sometimes what looks like perfectly reasonable TS causes massive compiler slowdowns. This PR creates a new benchmark workflow that runs tsc --extendedDiagnostics several times on a simple script and parses the result. So we can at least have an automated spot check that a given TypeScript-related PR doesn't cause 5x the number of instantiations.

Also, I added some logic to store benchmark results on Mongoose's Atlas cluster, which will help provide some neat charts :)

image

Examples

Copy link
Collaborator

@AbdelrahmanHafez AbdelrahmanHafez left a comment

Choose a reason for hiding this comment

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

LGTM, this is a great start for having a time series for benchmarks.
It's important that in the future we have our benchmark files as immutable, so for example, if we were to add another test case, we'd need to create a new file for it, and then the benchmarking logic should create data for each file separately, and save it in the results array.

That way we can compare the same test across multiple mongoose versions.
Thanks 👍

@vkarpov15 vkarpov15 added this to the 6.2.10 milestone Apr 4, 2022
@vkarpov15 vkarpov15 merged commit 2bf039d into master Apr 4, 2022
@AbdelrahmanHafez AbdelrahmanHafez deleted the vkarpov15/ts-benchmark branch April 5, 2022 05:22
@AbdelrahmanHafez AbdelrahmanHafez mentioned this pull request Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants