Skip to content

Commit 24e2293

Browse files
committed
test(cli): remove flaky CPU throttle test
1 parent a94e9b7 commit 24e2293

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

test/cli.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,6 @@ test('runs benchmark', async (t) => {
1111
t.regex(result.stdout, /\d+ runs sampled: [0-9,]+ ops\/sec ±[0-9.]+%/)
1212
})
1313

14-
test('throttles CPU', async (t) => {
15-
const getOpsSec = (resultString) => {
16-
return parseInt(
17-
resultString.match(/([\d,]+) ops\/sec/)[1].replace(/,/g, '')
18-
)
19-
}
20-
const binPath = path.resolve(__dirname, '../lib/cli.js')
21-
const fixturePath = path.resolve(__dirname, 'fixtures/benchmark.js')
22-
23-
const woutT = (await execa(binPath, [fixturePath])).stdout
24-
const withT = (await execa(binPath, [fixturePath, '--cpuThrottle=4'])).stdout
25-
26-
t.assert(
27-
getOpsSec(withT) < getOpsSec(woutT),
28-
'The difference between throttled and not throttled execution is less then normal'
29-
)
30-
})
31-
3214
test('measures RAM', async (t) => {
3315
const binPath = path.resolve(__dirname, '../lib/cli.js')
3416
const fixturePath = path.resolve(__dirname, 'fixtures/benchmark.js')

0 commit comments

Comments
 (0)