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');
7
7
assert ( performance ) ;
8
8
assert ( performance . nodeTiming ) ;
9
9
assert . 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 ) ;
11
13
12
14
const inited = performance . now ( ) ;
13
- assert ( inited < 300 ) ;
15
+ assert ( inited < 20000 ) ;
14
16
15
17
{
16
18
const entries = performance . getEntries ( ) ;
@@ -113,7 +115,7 @@ function checkNodeTiming(props) {
113
115
if ( props [ prop ] . around !== undefined ) {
114
116
assert . strictEqual ( typeof performance . nodeTiming [ prop ] , 'number' ) ;
115
117
const delta = performance . nodeTiming [ prop ] - props [ prop ] . around ;
116
- assert ( Math . abs ( delta ) < 500 ) ;
118
+ assert ( Math . abs ( delta ) < 1000 ) ;
117
119
} else {
118
120
assert . strictEqual ( performance . nodeTiming [ prop ] , props [ prop ] ) ;
119
121
}
You can’t perform that action at this time.
0 commit comments