%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
'use strict'; const { ReflectConstruct, SafeMap, Symbol, } = primordials; const { codes: { ERR_ILLEGAL_CONSTRUCTOR, ERR_INVALID_THIS, } } = require('internal/errors'); const { createELDHistogram, } = internalBinding('performance'); const { validateInteger, validateObject, } = require('internal/validators'); const { Histogram, kHandle, kMap, } = require('internal/histogram'); const { kEmptyObject, } = require('internal/util'); const { makeTransferable, } = require('internal/worker/js_transferable'); const kEnabled = Symbol('kEnabled'); class ELDHistogram extends Histogram { constructor(i) { throw new ERR_ILLEGAL_CONSTRUCTOR(); } /** * @returns {boolean} */ enable() { if (this[kEnabled] === undefined) throw new ERR_INVALID_THIS('ELDHistogram'); if (this[kEnabled]) return false; this[kEnabled] = true; this[kHandle].start(); return true; } /** * @returns {boolean} */ disable() { if (this[kEnabled] === undefined) throw new ERR_INVALID_THIS('ELDHistogram'); if (!this[kEnabled]) return false; this[kEnabled] = false; this[kHandle].stop(); return true; } } /** * @param {{ * resolution : number * }} [options] * @returns {ELDHistogram} */ function monitorEventLoopDelay(options = kEmptyObject) { validateObject(options, 'options'); const { resolution = 10 } = options; validateInteger(resolution, 'options.resolution', 1); return makeTransferable(ReflectConstruct( function() { this[kEnabled] = false; this[kHandle] = createELDHistogram(resolution); this[kMap] = new SafeMap(); }, [], ELDHistogram)); } module.exports = monitorEventLoopDelay;