PerformanceEvent Class
Packages > @fluidframework/telemetry-utils > PerformanceEvent
Helper class to log performance events
Signature:
export declare class PerformanceEvent
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(logger, event) | Constructs a new instance of the PerformanceEvent class |
Methods
Method | Modifiers | Description |
---|---|---|
cancel(props, error) | ||
end(props, eventNameSuffix) | ||
reportEvent(eventNameSuffix, props, error) | ||
reportProgress(props, eventNameSuffix) | ||
start(logger, event) | static |
|
timedExec(logger, event, callback) | static |
|
timedExecAsync(logger, event, callback) | static |
Constructors
PerformanceEvent.(constructor)
Constructs a new instance of the PerformanceEvent
class
Signature:
protected constructor(logger: ITelemetryLogger, event: ITelemetryGenericEvent);
Parameters
Parameter | Type | Description |
---|---|---|
logger | ITelemetryLogger | |
event | ITelemetryGenericEvent |
Methods
cancel
Signature:
cancel(props?: ITelemetryProperties, error?: any): void;
Parameters
Parameter | Type | Description |
---|---|---|
props | ITelemetryProperties | |
error | any |
Returns:
void
end
Signature:
end(props?: ITelemetryProperties, eventNameSuffix?: string): void;
Parameters
Parameter | Type | Description |
---|---|---|
props | ITelemetryProperties | |
eventNameSuffix | string |
Returns:
void
reportEvent
Signature:
reportEvent(eventNameSuffix: string, props?: ITelemetryProperties, error?: any): void;
Parameters
Parameter | Type | Description |
---|---|---|
eventNameSuffix | string | |
props | ITelemetryProperties | |
error | any |
Returns:
void
reportProgress
Signature:
reportProgress(props?: ITelemetryProperties, eventNameSuffix?: string): void;
Parameters
Parameter | Type | Description |
---|---|---|
props | ITelemetryProperties | |
eventNameSuffix | string |
Returns:
void
start
Signature:
static start(logger: ITelemetryLogger, event: ITelemetryGenericEvent): PerformanceEvent;
Parameters
Parameter | Type | Description |
---|---|---|
logger | ITelemetryLogger | |
event | ITelemetryGenericEvent |
Returns:
timedExec
Signature:
static timedExec<T>(logger: ITelemetryLogger, event: ITelemetryGenericEvent, callback: (event: PerformanceEvent) => T): T;
Parameters
Parameter | Type | Description |
---|---|---|
logger | ITelemetryLogger | |
event | ITelemetryGenericEvent | |
callback | (event: PerformanceEvent) => T |
Returns:
T
timedExecAsync
Signature:
static timedExecAsync<T>(logger: ITelemetryLogger, event: ITelemetryGenericEvent, callback: (event: PerformanceEvent) => Promise<T>): Promise<T>;
Parameters
Parameter | Type | Description |
---|---|---|
logger | ITelemetryLogger | |
event | ITelemetryGenericEvent | |
callback | (event: PerformanceEvent) => Promise |
Returns:
Promise<T>