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

test,report: relax CPU match requirements #28884

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

Some CPUs have variable speeds, and so exact matches between what
os.cpus() and the report feature yield cannot always be expected:

> const results = []
> setInterval(() => results.push(os.cpus().map(({ speed }) => speed)), 1)
[...]
> results
[
  [ 1198, 1150, 1195, 1149 ],
  [ 1198, 1150, 1195, 1149 ],
  [ 1198, 1150, 1195, 1149 ],
  [ 1198, 1150, 1195, 1149 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2596, 2401, 2699, 2555 ],
[...]

Refs: #28829

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Some CPUs have variable speeds, and so exact matches between what
`os.cpus()` and the report feature yield cannot always be expected:

```
> const results = []
> setInterval(() => results.push(os.cpus().map(({ speed }) => speed)), 1)
[...]
> results
[
  [ 1198, 1150, 1195, 1149 ],
  [ 1198, 1150, 1195, 1149 ],
  [ 1198, 1150, 1195, 1149 ],
  [ 1198, 1150, 1195, 1149 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2596, 2401, 2699, 2555 ],
[...]
```

Refs: nodejs#28829
@addaleax addaleax added test Issues and PRs related to the tests. report Issues and PRs related to process.report. labels Jul 28, 2019
@addaleax addaleax requested a review from cjihrig July 28, 2019 20:40
Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@ChALkeR
Copy link
Member

ChALkeR commented Jul 29, 2019

Should close #28886?

@cjihrig
Copy link
Contributor

cjihrig commented Jul 29, 2019

👍 to fast track?

@addaleax addaleax added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. fast-track PRs that do not need to wait for 48 hours to land. labels Jul 29, 2019
@nodejs-github-bot
Copy link
Collaborator

Trott pushed a commit to Trott/io.js that referenced this pull request Jul 29, 2019
Some CPUs have variable speeds, and so exact matches between what
`os.cpus()` and the report feature yield cannot always be expected:

```
>const results = []
>setInterval(() => results.push(os.cpus().map(({ speed }) => speed)), 1)
[...]
>results
[
  [ 1198, 1150, 1195, 1149 ],
  [ 1198, 1150, 1195, 1149 ],
  [ 1198, 1150, 1195, 1149 ],
  [ 1198, 1150, 1195, 1149 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2596, 2401, 2699, 2555 ],
[...]
```

Refs: nodejs#28829

PR-URL: nodejs#28884
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@Trott
Copy link
Member

Trott commented Jul 29, 2019

Landed in 98d8ed6

@Trott Trott closed this Jul 29, 2019
targos pushed a commit that referenced this pull request Aug 2, 2019
Some CPUs have variable speeds, and so exact matches between what
`os.cpus()` and the report feature yield cannot always be expected:

```
>const results = []
>setInterval(() => results.push(os.cpus().map(({ speed }) => speed)), 1)
[...]
>results
[
  [ 1198, 1150, 1195, 1149 ],
  [ 1198, 1150, 1195, 1149 ],
  [ 1198, 1150, 1195, 1149 ],
  [ 1198, 1150, 1195, 1149 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2401, 2420, 2429, 2413 ],
  [ 2596, 2401, 2699, 2555 ],
[...]
```

Refs: #28829

PR-URL: #28884
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. fast-track PRs that do not need to wait for 48 hours to land. report Issues and PRs related to process.report. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants