Skip to content

Commit 497b54d

Browse files
committed
fixup! Reduce expected precision
1 parent d8a0744 commit 497b54d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/parallel/test-performance.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ const { performance } = require('perf_hooks');
77
assert(performance);
88
assert(performance.nodeTiming);
99
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);
1113

1214
const 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
}

0 commit comments

Comments
 (0)