File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed
Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -11,24 +11,6 @@ test('runs benchmark', async (t) => {
1111 t . regex ( result . stdout , / \d + r u n s s a m p l e d : [ 0 - 9 , ] + o p s \/ s e c ± [ 0 - 9 . ] + % / )
1212} )
1313
14- test ( 'throttles CPU' , async ( t ) => {
15- const getOpsSec = ( resultString ) => {
16- return parseInt (
17- resultString . match ( / ( [ \d , ] + ) o p s \/ s e c / ) [ 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-
3214test ( 'measures RAM' , async ( t ) => {
3315 const binPath = path . resolve ( __dirname , '../lib/cli.js' )
3416 const fixturePath = path . resolve ( __dirname , 'fixtures/benchmark.js' )
You can’t perform that action at this time.
0 commit comments