Skip to content

Commit 5f6363f

Browse files
author
rhamlett_microsoft
committed
Fixed issue with request timeouts not showing.
1 parent 80269cb commit 5f6363f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/PerfProblemSimulator/Services/LatencyProbeService.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,14 @@ private LatencyMeasurement MeasureLatency(HttpClient httpClient, CancellationTok
257257

258258
// Always report the actual elapsed time, even on error/timeout
259259
// This ensures the chart shows the full impact of queuing (Total Time)
260+
// Also flag as timeout if elapsed time exceeds threshold (request completed but too slowly)
261+
if (!isTimeout && stopwatch.ElapsedMilliseconds >= RequestTimeoutMs)
262+
{
263+
isTimeout = true;
264+
_logger.LogWarning("Probe request exceeded timeout threshold: {ElapsedMs}ms >= {TimeoutMs}ms",
265+
stopwatch.ElapsedMilliseconds, RequestTimeoutMs);
266+
}
267+
260268
return new LatencyMeasurement
261269
{
262270
Timestamp = timestamp,

0 commit comments

Comments
 (0)