@types/node 16.18.86 → 16.18.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. node v16.18/README.md +2 -2
  2. node v16.18/package.json +3 -15
  3. node v16.18/ts4.8/assert/strict.d.ts +0 -8
  4. node v16.18/ts4.8/assert.d.ts +0 -986
  5. node v16.18/ts4.8/async_hooks.d.ts +0 -501
  6. node v16.18/ts4.8/buffer.d.ts +0 -2266
  7. node v16.18/ts4.8/child_process.d.ts +0 -1536
  8. node v16.18/ts4.8/cluster.d.ts +0 -436
  9. node v16.18/ts4.8/console.d.ts +0 -412
  10. node v16.18/ts4.8/constants.d.ts +0 -19
  11. node v16.18/ts4.8/crypto.d.ts +0 -4346
  12. node v16.18/ts4.8/dgram.d.ts +0 -591
  13. node v16.18/ts4.8/diagnostics_channel.d.ts +0 -191
  14. node v16.18/ts4.8/dns/promises.d.ts +0 -372
  15. node v16.18/ts4.8/dns.d.ts +0 -796
  16. node v16.18/ts4.8/dom-events.d.ts +0 -122
  17. node v16.18/ts4.8/domain.d.ts +0 -170
  18. node v16.18/ts4.8/events.d.ts +0 -714
  19. node v16.18/ts4.8/fs/promises.d.ts +0 -1124
  20. node v16.18/ts4.8/fs.d.ts +0 -4030
  21. node v16.18/ts4.8/globals.d.ts +0 -291
  22. node v16.18/ts4.8/globals.global.d.ts +0 -1
  23. node v16.18/ts4.8/http.d.ts +0 -1586
  24. node v16.18/ts4.8/http2.d.ts +0 -2353
  25. node v16.18/ts4.8/https.d.ts +0 -534
  26. node v16.18/ts4.8/index.d.ts +0 -86
  27. node v16.18/ts4.8/inspector.d.ts +0 -2743
  28. node v16.18/ts4.8/module.d.ts +0 -221
  29. node v16.18/ts4.8/net.d.ts +0 -858
  30. node v16.18/ts4.8/os.d.ts +0 -455
  31. node v16.18/ts4.8/path.d.ts +0 -191
  32. node v16.18/ts4.8/perf_hooks.d.ts +0 -603
  33. node v16.18/ts4.8/process.d.ts +0 -1525
  34. node v16.18/ts4.8/punycode.d.ts +0 -117
  35. node v16.18/ts4.8/querystring.d.ts +0 -141
  36. node v16.18/ts4.8/readline.d.ts +0 -553
  37. node v16.18/ts4.8/repl.d.ts +0 -430
  38. node v16.18/ts4.8/stream/consumers.d.ts +0 -12
  39. node v16.18/ts4.8/stream/promises.d.ts +0 -83
  40. node v16.18/ts4.8/stream/web.d.ts +0 -392
  41. node v16.18/ts4.8/stream.d.ts +0 -1494
  42. node v16.18/ts4.8/string_decoder.d.ts +0 -67
  43. node v16.18/ts4.8/test.d.ts +0 -190
  44. node v16.18/ts4.8/timers/promises.d.ts +0 -93
  45. node v16.18/ts4.8/timers.d.ts +0 -109
  46. node v16.18/ts4.8/tls.d.ts +0 -1099
  47. node v16.18/ts4.8/trace_events.d.ts +0 -161
  48. node v16.18/ts4.8/tty.d.ts +0 -204
  49. node v16.18/ts4.8/url.d.ts +0 -885
  50. node v16.18/ts4.8/util.d.ts +0 -1689
  51. node v16.18/ts4.8/v8.d.ts +0 -626
  52. node v16.18/ts4.8/vm.d.ts +0 -507
  53. node v16.18/ts4.8/wasi.d.ts +0 -158
  54. node v16.18/ts4.8/worker_threads.d.ts +0 -649
  55. node v16.18/ts4.8/zlib.d.ts +0 -517
@@ -1,603 +0,0 @@
1
- /**
2
- * This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for
3
- * Node.js-specific performance measurements.
4
- *
5
- * Node.js supports the following [Web Performance APIs](https://w3c.github.io/perf-timing-primer/):
6
- *
7
- * * [High Resolution Time](https://www.w3.org/TR/hr-time-2)
8
- * * [Performance Timeline](https://w3c.github.io/performance-timeline/)
9
- * * [User Timing](https://www.w3.org/TR/user-timing/)
10
- *
11
- * ```js
12
- * const { PerformanceObserver, performance } = require('perf_hooks');
13
- *
14
- * const obs = new PerformanceObserver((items) => {
15
- * console.log(items.getEntries()[0].duration);
16
- * performance.clearMarks();
17
- * });
18
- * obs.observe({ type: 'measure' });
19
- * performance.measure('Start to Now');
20
- *
21
- * performance.mark('A');
22
- * doSomeLongRunningProcess(() => {
23
- * performance.measure('A to Now', 'A');
24
- *
25
- * performance.mark('B');
26
- * performance.measure('A to B', 'A', 'B');
27
- * });
28
- * ```
29
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/perf_hooks.js)
30
- */
31
- declare module "perf_hooks" {
32
- import { AsyncResource } from "node:async_hooks";
33
- type EntryType = "node" | "mark" | "measure" | "gc" | "function" | "http2" | "http" | "dns";
34
- interface NodeGCPerformanceDetail {
35
- /**
36
- * When `performanceEntry.entryType` is equal to 'gc', `the performance.kind` property identifies
37
- * the type of garbage collection operation that occurred.
38
- * See perf_hooks.constants for valid values.
39
- */
40
- readonly kind?: number | undefined;
41
- /**
42
- * When `performanceEntry.entryType` is equal to 'gc', the `performance.flags`
43
- * property contains additional information about garbage collection operation.
44
- * See perf_hooks.constants for valid values.
45
- */
46
- readonly flags?: number | undefined;
47
- }
48
- /**
49
- * @since v8.5.0
50
- */
51
- class PerformanceEntry {
52
- protected constructor();
53
- /**
54
- * The total number of milliseconds elapsed for this entry. This value will not
55
- * be meaningful for all Performance Entry types.
56
- * @since v8.5.0
57
- */
58
- readonly duration: number;
59
- /**
60
- * The name of the performance entry.
61
- * @since v8.5.0
62
- */
63
- readonly name: string;
64
- /**
65
- * The high resolution millisecond timestamp marking the starting time of the
66
- * Performance Entry.
67
- * @since v8.5.0
68
- */
69
- readonly startTime: number;
70
- /**
71
- * The type of the performance entry. It may be one of:
72
- *
73
- * * `'node'` (Node.js only)
74
- * * `'mark'` (available on the Web)
75
- * * `'measure'` (available on the Web)
76
- * * `'gc'` (Node.js only)
77
- * * `'function'` (Node.js only)
78
- * * `'http2'` (Node.js only)
79
- * * `'http'` (Node.js only)
80
- * @since v8.5.0
81
- */
82
- readonly entryType: EntryType;
83
- /**
84
- * Additional detail specific to the `entryType`.
85
- * @since v16.0.0
86
- */
87
- readonly detail?: NodeGCPerformanceDetail | unknown | undefined; // TODO: Narrow this based on entry type.
88
- }
89
- /**
90
- * _This property is an extension by Node.js. It is not available in Web browsers._
91
- *
92
- * Provides timing details for Node.js itself. The constructor of this class
93
- * is not exposed to users.
94
- * @since v8.5.0
95
- */
96
- class PerformanceNodeTiming extends PerformanceEntry {
97
- /**
98
- * The high resolution millisecond timestamp at which the Node.js process
99
- * completed bootstrapping. If bootstrapping has not yet finished, the property
100
- * has the value of -1.
101
- * @since v8.5.0
102
- */
103
- readonly bootstrapComplete: number;
104
- /**
105
- * The high resolution millisecond timestamp at which the Node.js environment was
106
- * initialized.
107
- * @since v8.5.0
108
- */
109
- readonly environment: number;
110
- /**
111
- * The high resolution millisecond timestamp of the amount of time the event loop
112
- * has been idle within the event loop's event provider (e.g. `epoll_wait`). This
113
- * does not take CPU usage into consideration. If the event loop has not yet
114
- * started (e.g., in the first tick of the main script), the property has the
115
- * value of 0.
116
- * @since v14.10.0, v12.19.0
117
- */
118
- readonly idleTime: number;
119
- /**
120
- * The high resolution millisecond timestamp at which the Node.js event loop
121
- * exited. If the event loop has not yet exited, the property has the value of -1\.
122
- * It can only have a value of not -1 in a handler of the `'exit'` event.
123
- * @since v8.5.0
124
- */
125
- readonly loopExit: number;
126
- /**
127
- * The high resolution millisecond timestamp at which the Node.js event loop
128
- * started. If the event loop has not yet started (e.g., in the first tick of the
129
- * main script), the property has the value of -1.
130
- * @since v8.5.0
131
- */
132
- readonly loopStart: number;
133
- /**
134
- * The high resolution millisecond timestamp at which the V8 platform was
135
- * initialized.
136
- * @since v8.5.0
137
- */
138
- readonly v8Start: number;
139
- }
140
- interface EventLoopUtilization {
141
- idle: number;
142
- active: number;
143
- utilization: number;
144
- }
145
- /**
146
- * @param util1 The result of a previous call to eventLoopUtilization()
147
- * @param util2 The result of a previous call to eventLoopUtilization() prior to util1
148
- */
149
- type EventLoopUtilityFunction = (
150
- util1?: EventLoopUtilization,
151
- util2?: EventLoopUtilization,
152
- ) => EventLoopUtilization;
153
- interface MarkOptions {
154
- /**
155
- * Additional optional detail to include with the mark.
156
- */
157
- detail?: unknown | undefined;
158
- /**
159
- * An optional timestamp to be used as the mark time.
160
- * @default `performance.now()`.
161
- */
162
- startTime?: number | undefined;
163
- }
164
- interface MeasureOptions {
165
- /**
166
- * Additional optional detail to include with the mark.
167
- */
168
- detail?: unknown | undefined;
169
- /**
170
- * Duration between start and end times.
171
- */
172
- duration?: number | undefined;
173
- /**
174
- * Timestamp to be used as the end time, or a string identifying a previously recorded mark.
175
- */
176
- end?: number | string | undefined;
177
- /**
178
- * Timestamp to be used as the start time, or a string identifying a previously recorded mark.
179
- */
180
- start?: number | string | undefined;
181
- }
182
- interface TimerifyOptions {
183
- /**
184
- * A histogram object created using
185
- * `perf_hooks.createHistogram()` that will record runtime durations in
186
- * nanoseconds.
187
- */
188
- histogram?: RecordableHistogram | undefined;
189
- }
190
- interface Performance {
191
- /**
192
- * If name is not provided, removes all PerformanceMark objects from the Performance Timeline.
193
- * If name is provided, removes only the named mark.
194
- * @param name
195
- */
196
- clearMarks(name?: string): void;
197
- /**
198
- * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline.
199
- * If name is provided, removes only the named measure.
200
- * @param name
201
- * @since v16.7.0
202
- */
203
- clearMeasures(name?: string): void;
204
- /**
205
- * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`.
206
- * If you are only interested in performance entries of certain types or that have certain names, see
207
- * `performance.getEntriesByType()` and `performance.getEntriesByName()`.
208
- * @since v16.7.0
209
- */
210
- getEntries(): PerformanceEntry[];
211
- /**
212
- * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`
213
- * whose `performanceEntry.name` is equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to `type`.
214
- * @param name
215
- * @param type
216
- * @since v16.7.0
217
- */
218
- getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
219
- /**
220
- * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`
221
- * whose `performanceEntry.entryType` is equal to `type`.
222
- * @param type
223
- * @since v16.7.0
224
- */
225
- getEntriesByType(type: EntryType): PerformanceEntry[];
226
- /**
227
- * Creates a new PerformanceMark entry in the Performance Timeline.
228
- * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark',
229
- * and whose performanceEntry.duration is always 0.
230
- * Performance marks are used to mark specific significant moments in the Performance Timeline.
231
- * @param name
232
- */
233
- mark(name?: string, options?: MarkOptions): void;
234
- /**
235
- * Creates a new PerformanceMeasure entry in the Performance Timeline.
236
- * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure',
237
- * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark.
238
- *
239
- * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify
240
- * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist,
241
- * then startMark is set to timeOrigin by default.
242
- *
243
- * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp
244
- * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown.
245
- * @param name
246
- * @param startMark
247
- * @param endMark
248
- */
249
- measure(name: string, startMark?: string, endMark?: string): void;
250
- measure(name: string, options: MeasureOptions): void;
251
- /**
252
- * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones.
253
- */
254
- readonly nodeTiming: PerformanceNodeTiming;
255
- /**
256
- * @return the current high resolution millisecond timestamp
257
- */
258
- now(): number;
259
- /**
260
- * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured.
261
- */
262
- readonly timeOrigin: number;
263
- /**
264
- * Wraps a function within a new function that measures the running time of the wrapped function.
265
- * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed.
266
- * @param fn
267
- */
268
- timerify<T extends (...params: any[]) => any>(fn: T, options?: TimerifyOptions): T;
269
- /**
270
- * eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time.
271
- * It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait).
272
- * No other CPU idle time is taken into consideration.
273
- */
274
- eventLoopUtilization: EventLoopUtilityFunction;
275
- }
276
- interface PerformanceObserverEntryList {
277
- /**
278
- * Returns a list of `PerformanceEntry` objects in chronological order
279
- * with respect to `performanceEntry.startTime`.
280
- *
281
- * ```js
282
- * const {
283
- * performance,
284
- * PerformanceObserver
285
- * } = require('perf_hooks');
286
- *
287
- * const obs = new PerformanceObserver((perfObserverList, observer) => {
288
- * console.log(perfObserverList.getEntries());
289
- *
290
- * * [
291
- * * PerformanceEntry {
292
- * * name: 'test',
293
- * * entryType: 'mark',
294
- * * startTime: 81.465639,
295
- * * duration: 0
296
- * * },
297
- * * PerformanceEntry {
298
- * * name: 'meow',
299
- * * entryType: 'mark',
300
- * * startTime: 81.860064,
301
- * * duration: 0
302
- * * }
303
- * * ]
304
- *
305
- * observer.disconnect();
306
- * });
307
- * obs.observe({ type: 'mark' });
308
- *
309
- * performance.mark('test');
310
- * performance.mark('meow');
311
- * ```
312
- * @since v8.5.0
313
- */
314
- getEntries(): PerformanceEntry[];
315
- /**
316
- * Returns a list of `PerformanceEntry` objects in chronological order
317
- * with respect to `performanceEntry.startTime` whose `performanceEntry.name` is
318
- * equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to`type`.
319
- *
320
- * ```js
321
- * const {
322
- * performance,
323
- * PerformanceObserver
324
- * } = require('perf_hooks');
325
- *
326
- * const obs = new PerformanceObserver((perfObserverList, observer) => {
327
- * console.log(perfObserverList.getEntriesByName('meow'));
328
- *
329
- * * [
330
- * * PerformanceEntry {
331
- * * name: 'meow',
332
- * * entryType: 'mark',
333
- * * startTime: 98.545991,
334
- * * duration: 0
335
- * * }
336
- * * ]
337
- *
338
- * console.log(perfObserverList.getEntriesByName('nope')); // []
339
- *
340
- * console.log(perfObserverList.getEntriesByName('test', 'mark'));
341
- *
342
- * * [
343
- * * PerformanceEntry {
344
- * * name: 'test',
345
- * * entryType: 'mark',
346
- * * startTime: 63.518931,
347
- * * duration: 0
348
- * * }
349
- * * ]
350
- *
351
- * console.log(perfObserverList.getEntriesByName('test', 'measure')); // []
352
- * observer.disconnect();
353
- * });
354
- * obs.observe({ entryTypes: ['mark', 'measure'] });
355
- *
356
- * performance.mark('test');
357
- * performance.mark('meow');
358
- * ```
359
- * @since v8.5.0
360
- */
361
- getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
362
- /**
363
- * Returns a list of `PerformanceEntry` objects in chronological order
364
- * with respect to `performanceEntry.startTime` whose `performanceEntry.entryType`is equal to `type`.
365
- *
366
- * ```js
367
- * const {
368
- * performance,
369
- * PerformanceObserver
370
- * } = require('perf_hooks');
371
- *
372
- * const obs = new PerformanceObserver((perfObserverList, observer) => {
373
- * console.log(perfObserverList.getEntriesByType('mark'));
374
- *
375
- * * [
376
- * * PerformanceEntry {
377
- * * name: 'test',
378
- * * entryType: 'mark',
379
- * * startTime: 55.897834,
380
- * * duration: 0
381
- * * },
382
- * * PerformanceEntry {
383
- * * name: 'meow',
384
- * * entryType: 'mark',
385
- * * startTime: 56.350146,
386
- * * duration: 0
387
- * * }
388
- * * ]
389
- *
390
- * observer.disconnect();
391
- * });
392
- * obs.observe({ type: 'mark' });
393
- *
394
- * performance.mark('test');
395
- * performance.mark('meow');
396
- * ```
397
- * @since v8.5.0
398
- */
399
- getEntriesByType(type: EntryType): PerformanceEntry[];
400
- }
401
- type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void;
402
- class PerformanceObserver extends AsyncResource {
403
- constructor(callback: PerformanceObserverCallback);
404
- /**
405
- * Disconnects the `PerformanceObserver` instance from all notifications.
406
- * @since v8.5.0
407
- */
408
- disconnect(): void;
409
- /**
410
- * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes`or `options.type`:
411
- *
412
- * ```js
413
- * const {
414
- * performance,
415
- * PerformanceObserver
416
- * } = require('perf_hooks');
417
- *
418
- * const obs = new PerformanceObserver((list, observer) => {
419
- * // Called three times synchronously. `list` contains one item.
420
- * });
421
- * obs.observe({ type: 'mark' });
422
- *
423
- * for (let n = 0; n < 3; n++)
424
- * performance.mark(`test${n}`);
425
- * ```
426
- * @since v8.5.0
427
- */
428
- observe(
429
- options:
430
- | {
431
- entryTypes: readonly EntryType[];
432
- buffered?: boolean | undefined;
433
- }
434
- | {
435
- type: EntryType;
436
- buffered?: boolean | undefined;
437
- },
438
- ): void;
439
- }
440
- namespace constants {
441
- const NODE_PERFORMANCE_GC_MAJOR: number;
442
- const NODE_PERFORMANCE_GC_MINOR: number;
443
- const NODE_PERFORMANCE_GC_INCREMENTAL: number;
444
- const NODE_PERFORMANCE_GC_WEAKCB: number;
445
- const NODE_PERFORMANCE_GC_FLAGS_NO: number;
446
- const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number;
447
- const NODE_PERFORMANCE_GC_FLAGS_FORCED: number;
448
- const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number;
449
- const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number;
450
- const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number;
451
- const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number;
452
- }
453
- const performance: Performance;
454
- interface EventLoopMonitorOptions {
455
- /**
456
- * The sampling rate in milliseconds.
457
- * Must be greater than zero.
458
- * @default 10
459
- */
460
- resolution?: number | undefined;
461
- }
462
- interface Histogram {
463
- /**
464
- * Returns a `Map` object detailing the accumulated percentile distribution.
465
- * @since v11.10.0
466
- */
467
- readonly percentiles: Map<number, number>;
468
- /**
469
- * The number of times the event loop delay exceeded the maximum 1 hour event
470
- * loop delay threshold.
471
- * @since v11.10.0
472
- */
473
- readonly exceeds: number;
474
- /**
475
- * The minimum recorded event loop delay.
476
- * @since v11.10.0
477
- */
478
- readonly min: number;
479
- /**
480
- * The maximum recorded event loop delay.
481
- * @since v11.10.0
482
- */
483
- readonly max: number;
484
- /**
485
- * The mean of the recorded event loop delays.
486
- * @since v11.10.0
487
- */
488
- readonly mean: number;
489
- /**
490
- * The standard deviation of the recorded event loop delays.
491
- * @since v11.10.0
492
- */
493
- readonly stddev: number;
494
- /**
495
- * Resets the collected histogram data.
496
- * @since v11.10.0
497
- */
498
- reset(): void;
499
- /**
500
- * Returns the value at the given percentile.
501
- * @since v11.10.0
502
- * @param percentile A percentile value in the range (0, 100].
503
- */
504
- percentile(percentile: number): number;
505
- }
506
- interface IntervalHistogram extends Histogram {
507
- /**
508
- * Enables the update interval timer. Returns `true` if the timer was
509
- * started, `false` if it was already started.
510
- * @since v11.10.0
511
- */
512
- enable(): boolean;
513
- /**
514
- * Disables the update interval timer. Returns `true` if the timer was
515
- * stopped, `false` if it was already stopped.
516
- * @since v11.10.0
517
- */
518
- disable(): boolean;
519
- }
520
- interface RecordableHistogram extends Histogram {
521
- /**
522
- * @since v15.9.0
523
- * @param val The amount to record in the histogram.
524
- */
525
- record(val: number | bigint): void;
526
- /**
527
- * Calculates the amount of time (in nanoseconds) that has passed since the
528
- * previous call to `recordDelta()` and records that amount in the histogram.
529
- *
530
- * ## Examples
531
- * @since v15.9.0
532
- */
533
- recordDelta(): void;
534
- }
535
- /**
536
- * _This property is an extension by Node.js. It is not available in Web browsers._
537
- *
538
- * Creates an `IntervalHistogram` object that samples and reports the event loop
539
- * delay over time. The delays will be reported in nanoseconds.
540
- *
541
- * Using a timer to detect approximate event loop delay works because the
542
- * execution of timers is tied specifically to the lifecycle of the libuv
543
- * event loop. That is, a delay in the loop will cause a delay in the execution
544
- * of the timer, and those delays are specifically what this API is intended to
545
- * detect.
546
- *
547
- * ```js
548
- * const { monitorEventLoopDelay } = require('perf_hooks');
549
- * const h = monitorEventLoopDelay({ resolution: 20 });
550
- * h.enable();
551
- * // Do something.
552
- * h.disable();
553
- * console.log(h.min);
554
- * console.log(h.max);
555
- * console.log(h.mean);
556
- * console.log(h.stddev);
557
- * console.log(h.percentiles);
558
- * console.log(h.percentile(50));
559
- * console.log(h.percentile(99));
560
- * ```
561
- * @since v11.10.0
562
- */
563
- function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram;
564
- interface CreateHistogramOptions {
565
- /**
566
- * The minimum recordable value. Must be an integer value greater than 0.
567
- * @default 1
568
- */
569
- min?: number | bigint | undefined;
570
- /**
571
- * The maximum recordable value. Must be an integer value greater than min.
572
- * @default Number.MAX_SAFE_INTEGER
573
- */
574
- max?: number | bigint | undefined;
575
- /**
576
- * The number of accuracy digits. Must be a number between 1 and 5.
577
- * @default 3
578
- */
579
- figures?: number | undefined;
580
- }
581
- /**
582
- * Returns a `RecordableHistogram`.
583
- * @since v15.9.0
584
- */
585
- function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
586
-
587
- import { performance as _performance } from "perf_hooks";
588
- global {
589
- /**
590
- * `performance` is a global reference for `require('perf_hooks').performance`
591
- * https://nodejs.org/api/globals.html#performance
592
- * @since v16.0.0
593
- */
594
- var performance: typeof globalThis extends {
595
- onmessage: any;
596
- performance: infer T;
597
- } ? T
598
- : typeof _performance;
599
- }
600
- }
601
- declare module "node:perf_hooks" {
602
- export * from "perf_hooks";
603
- }