public static endMeasure(name: string, markId: string): void {
performance.measure(name, markId);
performance.clearMarks(markId);
+ performance.clearMeasures(name);
}
public addRequestStatistic(
clearInterval(this.displayInterval);
}
performance.clearMarks();
+ performance.clearMeasures();
this.performanceObserver?.disconnect();
}
}
private initializePerformanceObserver(): void {
- this.performanceObserver = new PerformanceObserver((list) => {
- const lastPerformanceEntry = list.getEntries()[0];
+ this.performanceObserver = new PerformanceObserver((performanceObserverList) => {
+ const lastPerformanceEntry = performanceObserverList.getEntries()[0];
this.addPerformanceEntryToStatistics(lastPerformanceEntry);
logger.debug(
`${this.logPrefix()} '${lastPerformanceEntry.name}' performance entry: %j`,
}
private logStatistics(): void {
- logger.info(this.logPrefix() + ' %j', this.statistics);
+ logger.info(`${this.logPrefix()}`, {
+ ...this.statistics,
+ statisticsData: Utils.JSONStringifyWithMapSupport(this.statistics.statisticsData),
+ });
}
private startLogStatisticsInterval(): void {
}
public static JSONStringifyWithMapSupport(
- obj: Record<string, unknown> | Record<string, unknown>[],
+ obj: Record<string, unknown> | Record<string, unknown>[] | Map<string, unknown>,
space?: number
): string {
return JSON.stringify(