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

Benchmark parameter group #26425

Closed
BridgeAR opened this issue Mar 4, 2019 · 1 comment · Fixed by #54393 · May be fixed by #39285
Closed

Benchmark parameter group #26425

BridgeAR opened this issue Mar 4, 2019 · 1 comment · Fixed by #54393 · May be fixed by #39285
Labels
benchmark Issues and PRs related to the benchmark subsystem. help wanted Issues that need assistance from volunteers or PRs that need help to proceed.

Comments

@BridgeAR
Copy link
Member

BridgeAR commented Mar 4, 2019

We currently have the possibility to add different parameters when running benchmarks. These result in a matrix how they are run, e.g.,:

common.createBenchmark(main, {
  source: ['array', 'buffer', 'string'],
  len: [10, 2048],
  n: [50, 2048]
});

This results in 12 variations of the specific benchmark being run (3x source * 2x len * 2x n). However, often we only require to test a specific subset of these parameters but it is not possible to define such groups.

Example:

common.createBenchmark(main, {
  groupA: {
    source: ['array'],
    len: [10, 2048],
    n: [50]
  },
  groupB: {
    source: ['buffer', 'string'],
    len: [2048],
    n: [50, 2048]
  }
});

Here we'd only run the benchmark 1 * 2 * 1 + 2 * 1 * 2 times (6x).

So if anyone would feel like implementing any such grouping functionality, that would be great! It will not be beneficial in all cases but at least in a couple. That way it's possible to reduce overall runtime.

// cc @mscdex

@BridgeAR BridgeAR added help wanted Issues that need assistance from volunteers or PRs that need help to proceed. benchmark Issues and PRs related to the benchmark subsystem. labels Mar 4, 2019
@abhinavsagar
Copy link

I also agree with @BridgeAR as this could reduce the number of computations. I am willing to work on this.

Mesteery added a commit to Mesteery/node that referenced this issue Jul 6, 2021
Mesteery added a commit to Mesteery/node that referenced this issue Jul 6, 2021
Add the `byGroup` option to have parameter grouping.
The environment variable `NODE_RUN_BENCHMARK_GROUPS` allows to benchmark
only certain groups: `NODE_RUN_BENCHMARK_GROUPS=groupA,groupB`.

Fixes: nodejs#26425
Mesteery added a commit to Mesteery/node that referenced this issue Jul 6, 2021
Add the `byGroup` option to have benchmark parameter grouping.
The environment variable `NODE_RUN_BENCHMARK_GROUPS` allows to benchmark
only certain groups: `NODE_RUN_BENCHMARK_GROUPS=groupA,groupB`.

Fixes: nodejs#26425
Mesteery added a commit to Mesteery/node that referenced this issue Jul 6, 2021
Add the `byGroup` option to have benchmark parameter grouping.
The environment variable `NODE_RUN_BENCHMARK_GROUPS` allows to benchmark
only certain groups: `NODE_RUN_BENCHMARK_GROUPS=groupA,groupB`.

Fixes: nodejs#26425
puskin94 added a commit to puskin94/node that referenced this issue Aug 15, 2024
nodejs-github-bot pushed a commit that referenced this issue Sep 4, 2024
Fixes: #26425
Co-Authored-By: Yaman Kassir <[email protected]>
PR-URL: #54393
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
aduh95 pushed a commit that referenced this issue Sep 12, 2024
Fixes: #26425
Co-Authored-By: Yaman Kassir <[email protected]>
PR-URL: #54393
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
targos pushed a commit that referenced this issue Sep 22, 2024
Fixes: #26425
Co-Authored-By: Yaman Kassir <[email protected]>
PR-URL: #54393
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
targos pushed a commit that referenced this issue Sep 26, 2024
Fixes: #26425
Co-Authored-By: Yaman Kassir <[email protected]>
PR-URL: #54393
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
targos pushed a commit that referenced this issue Oct 2, 2024
Fixes: #26425
Co-Authored-By: Yaman Kassir <[email protected]>
PR-URL: #54393
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
louwers pushed a commit to louwers/node that referenced this issue Nov 2, 2024
Fixes: nodejs#26425
Co-Authored-By: Yaman Kassir <[email protected]>
PR-URL: nodejs#54393
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark Issues and PRs related to the benchmark subsystem. help wanted Issues that need assistance from volunteers or PRs that need help to proceed.
Projects
None yet
4 participants