Skip to main content
Performance - Performance - Web documentation
interface Performance
Private
Deno supports [User Timing Level 3](https://w3c.github.io/user-timing) which is not widely supported yet in other runtimes. Check out the [Performance API](https://developer.mozilla.org/en-US/docs/Web/API/Performance) documentation on MDN for further information about how to use the API.

Methods

mark(
markName: string,
): PerformanceMark
Stores a timestamp with the associated name (a "mark").
measure(
measureName: string,
): PerformanceMeasure
Stores the `DOMHighResTimeStamp` duration between two marks along with the associated name (a "measure").

Properties

readonly
timeOrigin: number
Returns a timestamp representing the start of the performance measurement.

Methods

clearMarks(markName?: string): void
Removes the stored timestamp with the associated name.
clearMeasures(measureName?: string): void
Removes stored timestamp with the associated name.
getEntriesByName(
name: string,
type?: string,
): PerformanceEntryList
mark(
markName: string,
): PerformanceMark
Stores a timestamp with the associated name (a "mark").
measure(
measureName: string,
): PerformanceMeasure
Stores the `DOMHighResTimeStamp` duration between two marks along with the associated name (a "measure").
measure(
measureName: string,
startMark?: string,
endMark?: string,
): PerformanceMeasure
Stores the `DOMHighResTimeStamp` duration between two marks along with the associated name (a "measure").
now(): number
Returns a current time from Deno's start in fractional milliseconds. ```ts const t = performance.now(); console.log(`${t} ms since start!`); ```
toJSON(): any
Returns a JSON representation of the performance object.