(request: Request, task: Task, timestamp: number)
| 5470 | } |
| 5471 | |
| 5472 | function markOperationEndTime(request: Request, task: Task, timestamp: number) { |
| 5473 | if ( |
| 5474 | !enableProfilerTimer || |
| 5475 | (!enableComponentPerformanceTrack && !enableAsyncDebugInfo) |
| 5476 | ) { |
| 5477 | return; |
| 5478 | } |
| 5479 | // This is like advanceTaskTime() but always emits a timing chunk even if it doesn't advance. |
| 5480 | // This ensures that the end time of the previous entry isn't implied to be the start of the next one. |
| 5481 | if (request.status === ABORTING && timestamp > request.abortTime) { |
| 5482 | // If we're aborting then we don't emit any end times that happened after. |
| 5483 | return; |
| 5484 | } |
| 5485 | if (timestamp > task.time) { |
| 5486 | emitTimingChunk(request, task.id, timestamp); |
| 5487 | task.time = timestamp; |
| 5488 | } else { |
| 5489 | emitTimingChunk(request, task.id, task.time); |
| 5490 | } |
| 5491 | } |
| 5492 | |
| 5493 | function emitChunk( |
| 5494 | request: Request, |
no test coverage detected