File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,12 @@ const { performance } = require('perf_hooks');
77assert ( performance ) ;
88assert ( performance . nodeTiming ) ;
99assert . strictEqual ( typeof performance . timeOrigin , 'number' ) ;
10- assert ( Math . abs ( performance . timeOrigin - Date . now ( ) ) < 300 ) ;
10+ // Use a fairly large epsilon value, since we can only guarantee that the node
11+ // process started up in 20 seconds.
12+ assert ( Math . abs ( performance . timeOrigin - Date . now ( ) ) < 20000 ) ;
1113
1214const inited = performance . now ( ) ;
13- assert ( inited < 300 ) ;
15+ assert ( inited < 20000 ) ;
1416
1517{
1618 const entries = performance . getEntries ( ) ;
@@ -113,7 +115,7 @@ function checkNodeTiming(props) {
113115 if ( props [ prop ] . around !== undefined ) {
114116 assert . strictEqual ( typeof performance . nodeTiming [ prop ] , 'number' ) ;
115117 const delta = performance . nodeTiming [ prop ] - props [ prop ] . around ;
116- assert ( Math . abs ( delta ) < 500 ) ;
118+ assert ( Math . abs ( delta ) < 1000 ) ;
117119 } else {
118120 assert . strictEqual ( performance . nodeTiming [ prop ] , props [ prop ] ) ;
119121 }
You can’t perform that action at this time.
0 commit comments