Skip to main content

Performance

interface Performance

Deno supports User Timing Level 3 which is not widely supported yet in other runtimes.

Check out the Performance API documentation on MDN for further information about how to use the API.

Stores a timestamp with the associated name (a "mark").

Stores the DOMHighResTimeStamp duration between two marks along with the associated name (a "measure").

Properties Jump to heading

Returns a timestamp representing the start of the performance measurement.

Jump to headingclearMarks(markName?: string): void

Removes the stored timestamp with the associated name.

Jump to headingclearMeasures(measureName?: string): void

Removes stored timestamp with the associated name.

Stores a timestamp with the associated name (a "mark").

Stores the DOMHighResTimeStamp duration between two marks along with the associated name (a "measure").

Jump to headingmeasure(
measureName: string,
startMark?: string,
endMark?: string,
): PerformanceMeasure

Stores the DOMHighResTimeStamp duration between two marks along with the associated name (a "measure").

Returns a current time from Deno's start in fractional milliseconds.

const t = performance.now();
console.log(`${t} ms since start!`);

Returns a JSON representation of the performance object.

Back to top