Skip to content

feat: collect bootstrap timing metrics - #275

Open
yvasiyarov wants to merge 5 commits into
prometheus:mainfrom
yvasiyarov:bootstrap
Open

feat: collect bootstrap timing metrics#275
yvasiyarov wants to merge 5 commits into
prometheus:mainfrom
yvasiyarov:bootstrap

Conversation

@yvasiyarov

Copy link
Copy Markdown
Contributor

Collect bootstrap timing metrics

let perf_hooks;

try {
// eslint-disable-next-line

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can you disable the specific rule?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm sorry, but its looks like I can not disable only specific rule.
For node 6.x I should use
//eslint-disable-next-line node/no-missing-require
But for newer versions of node I should use
//eslint-disable-next-line node/no-unsupported-features/node-builtins
But I can not specify both rules. So I rolled back this to just
//eslint-disable-next-line

@SimenB SimenB left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks! I think this looks pretty good, just missing code for dealing with disabled timestamps

Comment thread lib/metrics/bootstrapTime.js Outdated
const now = Date.now();

if (entry.nodeStart !== -1) {
nodeStart.set({}, entry.nodeStart, now);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we have an option for disabling timestamps - mind adding code handling it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

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.

2 participants