(operation: string, logThreshold = 100)
| 237 | } |
| 238 | |
| 239 | endTimer(operation: string, logThreshold = 100): number { |
| 240 | const startTime = this.startTimes.get(operation); |
| 241 | if (!startTime) return 0; |
| 242 | |
| 243 | const elapsed = performance.now() - startTime; |
| 244 | this.startTimes.delete(operation); |
| 245 | |
| 246 | return elapsed; |
| 247 | } |
| 248 | |
| 249 | measureAsync<T>(operation: string, fn: () => Promise<T>): Promise<T> { |
| 250 | this.startTimer(operation); |
no test coverage detected