-
Notifications
You must be signed in to change notification settings - Fork 67
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
chore: add a new “Startup Time” event for sessions MONGOSH-1653 #1761
Conversation
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.
some comments, but one change requested in the package lock
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.
lgtm! one non-blocker nit
export const TimingCategories = { | ||
REPLInstantiation: 'REPLInstantiation', | ||
UserConfigLoading: 'UserConfigLoading', | ||
DriverSetup: 'DriverSetup', | ||
Logging: 'Logging', | ||
SnippetLoading: 'SnippetLoading', | ||
Snapshot: 'Snapshot', | ||
ResourceFileLoading: 'ResourceFileLoading', | ||
AsyncRewrite: 'AsyncRewrite', | ||
Eval: 'Eval', | ||
EvalFile: 'EvalFile', | ||
Telemetry: 'Telemetry', | ||
Main: 'Main', | ||
} as const; | ||
|
||
export type TimingCategory = | ||
(typeof TimingCategories)[keyof typeof TimingCategories]; |
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.
Small nit, I think fine as is, we have other places in the code base with this pattern already. IIRC we try to avoid enums and rather use string literals in our code, so this would look like:
export const TimingCategories = { | |
REPLInstantiation: 'REPLInstantiation', | |
UserConfigLoading: 'UserConfigLoading', | |
DriverSetup: 'DriverSetup', | |
Logging: 'Logging', | |
SnippetLoading: 'SnippetLoading', | |
Snapshot: 'Snapshot', | |
ResourceFileLoading: 'ResourceFileLoading', | |
AsyncRewrite: 'AsyncRewrite', | |
Eval: 'Eval', | |
EvalFile: 'EvalFile', | |
Telemetry: 'Telemetry', | |
Main: 'Main', | |
} as const; | |
export type TimingCategory = | |
(typeof TimingCategories)[keyof typeof TimingCategories]; | |
export type TimingCategory = | |
| 'REPLInstantiation' | |
| 'UserConfigLoading' | |
| 'DriverSetup' | |
| 'Logging' | |
| 'SnippetLoading' | |
| 'Snapshot' | |
| 'ResourceFileLoading' | |
| 'AsyncRewrite' | |
| 'Eval' | |
| 'EvalFile' | |
| 'Telemetry' | |
| 'Main'; |
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, this would have been a small nice-to-have :)
Co-authored-by: Bailey Pearson <[email protected]>
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
for (const [category, _, time] of timingData) { |
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.
Also, just fyi:
// eslint-disable-next-line @typescript-eslint/no-unused-vars | |
for (const [category, _, time] of timingData) { | |
for (const [category,, time] of timingData) { |
No description provided.