Skip to content

Commit 5936cef

Browse files
jasnelltargos
authored andcommitted
test: add disposable histogram test
PR-URL: #58384 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent 13abca3 commit 5936cef

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/parallel/test-perf-hooks-histogram.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,17 @@ const { inspect } = require('util');
9797
}, 50);
9898
}
9999

100+
{
101+
// Tests that the ELD histogram is disposable
102+
let histogram;
103+
{
104+
using hi = monitorEventLoopDelay();
105+
histogram = hi;
106+
}
107+
// The histogram should already be disabled.
108+
strictEqual(histogram.disable(), false);
109+
}
110+
100111
{
101112
const h = createHistogram();
102113
ok(inspect(h, { depth: null }).startsWith('Histogram'));

0 commit comments

Comments
 (0)