@@ -398,14 +398,14 @@ Returns a list of `PerformanceEntry` objects in chronological order
398
398
with respect to ` performanceEntry.startTime ` whose ` performanceEntry.entryType `
399
399
is equal to ` type ` .
400
400
401
- ## monitorEventLoopDelay([ options] )
401
+ ## perf_hooks. monitorEventLoopDelay([ options] )
402
402
<!-- YAML
403
403
added: REPLACEME
404
404
-->
405
405
406
406
* ` options ` {Object}
407
407
* ` resolution ` {number} The sampling rate in milliseconds. Must be greater
408
- than zero. Defaults to ` 10 ` .
408
+ than zero. ** Default: ** ` 10 ` .
409
409
* Returns: {Histogram}
410
410
411
411
Creates a ` Histogram ` object that samples and reports the event loop delay
@@ -421,7 +421,7 @@ detect.
421
421
const { monitorEventLoopDelay } = require (' perf_hooks' );
422
422
const h = monitorEventLoopDelay ({ resolution: 20 });
423
423
h .enable ();
424
- // Do something
424
+ // Do something.
425
425
h .disable ();
426
426
console .log (h .min );
427
427
console .log (h .max );
@@ -459,21 +459,30 @@ Enables the event loop delay sample timer. Returns `true` if the timer was
459
459
started, ` false ` if it was already started.
460
460
461
461
#### histogram.exceeds
462
+ <!-- YAML
463
+ added: REPLACEME
464
+ -->
462
465
463
- * Value: {number}
466
+ * {number}
464
467
465
468
The number of times the event loop delay exceeded the maximum 1 hour event
466
469
loop delay threshold.
467
470
468
471
#### histogram.max
472
+ <!-- YAML
473
+ added: REPLACEME
474
+ -->
469
475
470
- * Value: {number}
476
+ * {number}
471
477
472
478
The maximum recorded event loop delay.
473
479
474
480
#### histogram.mean
481
+ <!-- YAML
482
+ added: REPLACEME
483
+ -->
475
484
476
- * Value: {number}
485
+ * {number}
477
486
478
487
The mean of the recorded event loop delays.
479
488
@@ -482,19 +491,26 @@ The mean of the recorded event loop delays.
482
491
added: REPLACEME
483
492
-->
484
493
485
- * Value: {number}
494
+ * {number}
486
495
487
496
The minimum recorded event loop delay.
488
497
489
498
#### histogram.percentile(percentile)
499
+ <!-- YAML
500
+ added: REPLACEME
501
+ -->
490
502
491
503
* ` percentile ` {number} A percentile value between 1 and 100.
504
+ * Returns: {number}
492
505
493
506
Returns the value at the given percentile.
494
507
495
508
#### histogram.percentiles
509
+ <!-- YAML
510
+ added: REPLACEME
511
+ -->
496
512
497
- * Value: {Map}
513
+ * {Map}
498
514
499
515
Returns a ` Map ` object detailing the accumulated percentile distribution.
500
516
@@ -506,8 +522,11 @@ added: REPLACEME
506
522
Resets the collected histogram data.
507
523
508
524
#### histogram.stddev
525
+ <!-- YAML
526
+ added: REPLACEME
527
+ -->
509
528
510
- * Value: {number}
529
+ * {number}
511
530
512
531
The standard deviation of the recorded event loop delays.
513
532
0 commit comments