Skip to content

Exports

[<Class>]
type Exports =
    static member constants: Constants5
    static member performance: Performance
    static member PerformanceEntry () : PerformanceEntry
    static member PerformanceMark () : PerformanceMark
    static member PerformanceMeasure () : PerformanceMeasure
    static member PerformanceNodeTiming () : PerformanceNodeTiming
    static member PerformanceObserver (callback: PerformanceObserverCallback) : PerformanceObserver
    static member PerformanceObserverEntryList () : PerformanceObserverEntryList
    static member PerformanceResourceTiming () : PerformanceResourceTiming
    static member createHistogram (?options: CreateHistogramOptions) : RecordableHistogram
    static member monitorEventLoopDelay (?options: EventLoopMonitorOptions) : IntervalHistogram
AssemblyXantham.Fable.Node
Attributes[<Erase>]

The package's value exports, each bound to its import.

Properties

static member constants: Constants5
static member performance: Performance

Methods

static member PerformanceEntry () : PerformanceEntry

The constructor of this class is not exposed to users directly.

@since v8.5.0

static member PerformanceMark () : PerformanceMark

Exposes marks created via the Performance.mark() method.

@since v18.2.0, v16.17.0

static member PerformanceMeasure () : PerformanceMeasure

Exposes measures created via the Performance.measure() method.

The constructor of this class is not exposed to users directly.

@since v18.2.0, v16.17.0

static member PerformanceNodeTiming () : PerformanceNodeTiming

This property is an extension by Node.js. It is not available in Web browsers.

Provides timing details for Node.js itself. The constructor of this class is not exposed to users.

@since v8.5.0

static member PerformanceObserver (callback: PerformanceObserverCallback) : PerformanceObserver

@since v8.5.0

static member PerformanceObserverEntryList () : PerformanceObserverEntryList
static member PerformanceResourceTiming () : PerformanceResourceTiming

Provides detailed network timing data regarding the loading of an application's resources.

The constructor of this class is not exposed to users directly.

@since v18.2.0, v16.17.0

static member createHistogram (?options: CreateHistogramOptions) : RecordableHistogram

Returns a RecordableHistogram.

@since v15.9.0, v14.18.0

static member monitorEventLoopDelay (?options: EventLoopMonitorOptions) : IntervalHistogram

This property is an extension by Node.js. It is not available in Web browsers.

Creates an IntervalHistogram object that samples and reports the event loop delay over time. The delays will be reported in nanoseconds.

Using a timer to detect approximate event loop delay works because the execution of timers is tied specifically to the lifecycle of the libuv event loop. That is, a delay in the loop will cause a delay in the execution of the timer, and those delays are specifically what this API is intended to detect.

import { monitorEventLoopDelay } from 'node:perf_hooks';
const h = monitorEventLoopDelay({ resolution: 20 });
h.enable();
// Do something.
h.disable();
console.log(h.min);
console.log(h.max);
console.log(h.mean);
console.log(h.stddev);
console.log(h.percentiles);
console.log(h.percentile(50));
console.log(h.percentile(99));

@since v11.10.0