( request: Request, task: Task, timestamp: number, )
| 5447 | } |
| 5448 | |
| 5449 | function advanceTaskTime( |
| 5450 | request: Request, |
| 5451 | task: Task, |
| 5452 | timestamp: number, |
| 5453 | ): void { |
| 5454 | if ( |
| 5455 | !enableProfilerTimer || |
| 5456 | (!enableComponentPerformanceTrack && !enableAsyncDebugInfo) |
| 5457 | ) { |
| 5458 | return; |
| 5459 | } |
| 5460 | // Emits a timing chunk, if the new timestamp is higher than the previous timestamp of this task. |
| 5461 | if (timestamp > task.time) { |
| 5462 | emitTimingChunk(request, task.id, timestamp); |
| 5463 | task.time = timestamp; |
| 5464 | } else if (!task.timed) { |
| 5465 | // If it wasn't timed before, e.g. an outlined object, we need to emit the first timestamp and |
| 5466 | // it is now timed. |
| 5467 | emitTimingChunk(request, task.id, task.time); |
| 5468 | } |
| 5469 | task.timed = true; |
| 5470 | } |
| 5471 | |
| 5472 | function markOperationEndTime(request: Request, task: Task, timestamp: number) { |
| 5473 | if ( |
no test coverage detected