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.
Methods Jump to heading
Jump to headingmark(markName: string,options?: PerformanceMarkOptions,): PerformanceMarkStores a timestamp with the associated name (a "mark").
Jump to headingmeasure(measureName: string,options?: PerformanceMeasureOptions,): PerformanceMeasureStores the DOMHighResTimeStamp duration between two marks along with the
associated name (a "measure").
Properties Jump to heading
Jump to headingtimeOrigin: numberReturns a timestamp representing the start of the performance measurement.
Methods Jump to heading
Jump to headingclearMarks(markName?: string): voidRemoves the stored timestamp with the associated name.
Jump to headingclearMeasures(measureName?: string): voidRemoves stored timestamp with the associated name.
Jump to headinggetEntriesByName(name: string,type?: string,): PerformanceEntryListJump to headinggetEntriesByType(type: string): PerformanceEntryListJump to headingmark(markName: string,options?: PerformanceMarkOptions,): PerformanceMarkStores a timestamp with the associated name (a "mark").
Jump to headingmeasure(measureName: string,options?: PerformanceMeasureOptions,): PerformanceMeasureStores the DOMHighResTimeStamp duration between two marks along with the
associated name (a "measure").
Jump to headingmeasure(measureName: string,startMark?: string,endMark?: string,): PerformanceMeasureStores the DOMHighResTimeStamp duration between two marks along with the
associated name (a "measure").
Jump to headingnow(): numberReturns a current time from Deno's start in fractional milliseconds.
const t = performance.now();
console.log(`${t} ms since start!`);
Jump to headingtoJSON(): anyReturns a JSON representation of the performance object.