graph TD
A[Probe Service] -->|Measure RTT| B[CheckResult]
B -->|RttMs| C[MonitoringBackgroundService]
C -->|Update Endpoint| D[OutageDetectionService]
D -->|Persist LastRttMs| E[StatusService]
E -->|Serialize RTT| F[API Controller]
F -->|Response| G[Frontend Service]
G -->|Render| H[Frontend Components]
subgraph Potential Failure Points
A -->|Null/Zero RTT| B
B -->|Null RttMs| C
C -->|Ignore Null RTT| D
D -->|Skip Update| E
E -->|Empty RTT| F
F -->|Omit RTT| G
G -->|Display Placeholder| H
end
- Probe Types:
- ICMP: Uses
reply.RoundtripTime - TCP: Uses
stopwatch.ElapsedMilliseconds - HTTP: Uses
stopwatch.ElapsedMilliseconds
- ICMP: Uses
- Failure Handling:
- Sets
RttMsto null on probe failures - Different measurement methods may introduce inconsistencies
- Sets
- Logs RTT with trace:
_logger.LogTrace("Probed endpoint {EndpointId} ({Name}): {Status} in {RttMs}ms")
- Converts null RTT to "N/A"
- Copies
result.RttMsto new records - Potential loss point if RTT is null
- Uses
endpoint.LastRttMsto populate status responses - May return null/empty RTT
- Uses optional chaining and nullish coalescing
- Handles null RTT with placeholders ('-')
- Compare RTT measurements across different probe types
- Add detailed logging in
ProbeService - Verify stopwatch and
RoundtripTimecalculations
- Trace null RTT through each service layer
- Add comprehensive logging
- Validate null handling in serialization
- Inspect API response DTOs
- Check JSON serialization of RTT values
- Verify optional/nullable field handling
- Review TypeScript type definitions
- Validate RTT parsing in API services
- Test display logic for various RTT scenarios
- Successful probe with non-zero RTT
- Failed probe (null RTT)
- Edge cases: zero, very low, very high RTT values
- Multiple probe type comparisons
- Standardize RTT measurement across probe types
- Implement consistent null/zero RTT handling
- Add more granular logging and tracing
- Create comprehensive test suite for RTT propagation