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 entry
const loadTimeEntry: AcCmPerformanceEntry<number> = {
name: 'file-load-time',
data: 1250, // milliseconds
format() {
return `File loaded in ${this.data}ms`
}
}
interface AcCmPerformanceEntry<T> {
    data: T;
    name: string;
    format(): string;
}

Type Parameters

  • T

    The type of the performance data.

Properties

Methods

Properties

data: T

Performance data to be recorded.

name: string

Unique name of this performance entry.

Methods

  • Converts the performance data into a formatted string.

    Returns string

    A string representing the performance data.