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

dns: add basic perf_hooks support #18072

Closed
wants to merge 1 commit into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Jan 10, 2018

emit simple perf_hooks timings for dns operations.

const { PerformanceObserver, performance } = require('perf_hooks');
const obs = new PerformanceObserver((items) => {
  const entry = items.getEntries()[0];
  console.log(entry.name, entry.duration);
  performance.clearDNS();
});
obs.observe({ entryTypes: ['dns'] });

dns.resolveAny('example.org', console.log);
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

dns, perf_hooks

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. perf_hooks Issues and PRs related to the implementation of the Performance Timing API. labels Jan 10, 2018
@jasnell
Copy link
Member Author

jasnell commented Jan 10, 2018

Will depend on #18046 and shouldn't land until that one does

@jasnell jasnell added the blocked PRs that are blocked by other issues or PRs. label Jan 10, 2018
emit simple perf_hooks timings for dns operations.

```js
const { PerformanceObserver, performance } = require('perf_hooks');
const obs = new PerformanceObserver((items) => {
  const entry = items.getEntries()[0];
  console.log(entry.name, entry.duration);
  performance.clearDNS();
});
obs.observe({ entryTypes: ['dns'] });

dns.resolveAny('example.org', console.log);
```
@jasnell jasnell removed the blocked PRs that are blocked by other issues or PRs. label Jan 24, 2018
@jasnell
Copy link
Member Author

jasnell commented Jan 24, 2018

@BridgeAR
Copy link
Member

BridgeAR commented Feb 1, 2018

@jasnell looks like there were some issues with the CI?

@jasnell
Copy link
Member Author

jasnell commented Feb 1, 2018

Yep, I'll be getting back to this very soon

@jasnell jasnell added the wip Issues and PRs that are still a work in progress. label Feb 14, 2018
@jasnell jasnell closed this Feb 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. perf_hooks Issues and PRs related to the implementation of the Performance Timing API. wip Issues and PRs that are still a work in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants