Performance.timerify - Node documentation
method Performance.timerify

Usage in Deno

import { type Performance } from "node:perf_hooks";
Performance.timerify<T extends (...params: any[]) => any>(
fn: T,
options?: TimerifyOptions,
): T

Wraps a function within a new function that measures the running time of the wrapped function. A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed.

Type Parameters

T extends (...params: any[]) => any

Parameters

fn: T
optional
options: TimerifyOptions

Return Type

T