Display tight timing metrics from runSingleTest responses.
(result: dict[str, Any])
| 259 | |
| 260 | |
| 261 | def display_tight_timing(result: dict[str, Any]) -> None: |
| 262 | """Display tight timing metrics from runSingleTest responses.""" |
| 263 | metric = result.get("tightTiming") |
| 264 | if not isinstance(metric, dict): |
| 265 | return |
| 266 | |
| 267 | if not metric.get("supported", False): |
| 268 | reason = metric.get("message", "unsupported") |
| 269 | print(f" Tight timing: unsupported ({reason})") |
| 270 | return |
| 271 | |
| 272 | status = "PASS" if metric.get("passed", False) else "FAIL" |
| 273 | max_overhead = metric.get("max_overhead_us", "?") |
| 274 | max_allowed = metric.get("max_allowed_overhead_us", "?") |
| 275 | expected = metric.get("expected_wire_us", "?") |
| 276 | avg_total = metric.get("avg_total_us", "?") |
| 277 | print( |
| 278 | f" Tight timing: {status} max overhead {max_overhead}us " |
| 279 | f"(limit {max_allowed}us, wire {expected}us, avg total {avg_total}us)" |
| 280 | ) |
| 281 | |
| 282 | |
| 283 | def print_run_summary(ctx: RunContext) -> None: |
no test coverage detected