`benchmarkMode: "time"` does not respect `minSamples`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, node.js
- Domain
- performance
Research direction
Start by running the provided reproduction in bench-node and trace how benchmarkMode: "time" handles each suite entry's minSamples option. Done means both the asynchronous and synchronous examples perform at least 30 samples when run in time mode.
Written by the indexing model from the issue text.
Description
E.g:
const { Suite } = require('bench-node');
const { spawn, spawnSync } = require('node:child_process')
async function spawnProcess() {
const proc = spawn(
process.execPath,
[
'-e',
'1 + 1'
]);
return new Promise((resolve) => {
proc.on('exit', (code) => {
resolve();
})
})
}
function spawnProcessSync() {
const proc = spawnSync(
process.execPath,
[
'-e',
'1 + 1'
]);
}
const suite = new Suite({ benchmarkMode: "time" });
suite.add('Async spawnProcess', { minSamples: 30 }, async () => {
await spawnProcess();
});
suite.add('Sync spawnProcess', { minSamples: 30 }, () => {
spawnProcessSync();
});
suite.run();
- Dominant language
- JavaScript
- Stars
- 193
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RafaelGSS/bench-node
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
RafaelGSS/bench-node#168 · 1 comment ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 55/100
RafaelGSS/bench-node#167 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
RafaelGSS/bench-node#150 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
RafaelGSS/bench-node#138 · 4 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
RafaelGSS/bench-node#121 · 3 comments ·
All issues in RafaelGSS/bench-node
Similar issues
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100