A performance entry containing a unique name, associated data, and a method to format the data into a human-readable string.
// Create a custom performance entryconst loadTimeEntry: AcCmPerformanceEntry<number> = { name: 'file-load-time', data: 1250, // milliseconds format() { return `File loaded in ${this.data}ms` }} Copy
// Create a custom performance entryconst loadTimeEntry: AcCmPerformanceEntry<number> = { name: 'file-load-time', data: 1250, // milliseconds format() { return `File loaded in ${this.data}ms` }}
The type of the performance data.
Performance data to be recorded.
Unique name of this performance entry.
Converts the performance data into a formatted string.
A string representing the performance data.
A performance entry containing a unique name, associated data, and a method to format the data into a human-readable string.
Example