mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:45:32 -05:00
test: add disposable histogram test
PR-URL: https://github.com/nodejs/node/pull/58384 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
1 parent
13abca3c26
commit
5936cef60a
1 file changed
+11
@@ -97,6 +97,17 @@ const { inspect } = require('util');
|
||||
}, 50);
|
||||
}
|
||||
|
||||
{
|
||||
// Tests that the ELD histogram is disposable
|
||||
let histogram;
|
||||
{
|
||||
using hi = monitorEventLoopDelay();
|
||||
histogram = hi;
|
||||
}
|
||||
// The histogram should already be disabled.
|
||||
strictEqual(histogram.disable(), false);
|
||||
}
|
||||
|
||||
{
|
||||
const h = createHistogram();
|
||||
ok(inspect(h, { depth: null }).startsWith('Histogram'));
|
||||
|
||||
Reference in new issue
Block a user