Skip to content

Commit d57bd2b

Browse files
marcopiracciniaduh95
authored andcommitted
test: relax min assertion in test-performance-eventloopdelay
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com> PR-URL: #63100 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent ba0736a commit d57bd2b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

test/sequential/test-performance-eventloopdelay.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ const { sleep } = require('internal/util');
7171
// The values are non-deterministic, so we just check that a value is
7272
// present, as opposed to a specific value.
7373
assert(histogram.count > 0, `Expected samples to be recorded, got count=${histogram.count}`);
74-
assert(histogram.min > 0);
74+
// Min can legitimately be 0: the underlying HDR histogram has a
75+
// lowest discernible value of 1us, so samples whose delta falls in
76+
// the [0, 1us) bucket are reported as 0. A negative value would
77+
// indicate a bug.
78+
assert(histogram.min >= 0);
7579
assert(histogram.max > 0);
7680
assert(histogram.stddev > 0);
7781
assert(histogram.mean > 0);

0 commit comments

Comments
 (0)