(value: object)
| 31 | |
| 32 | |
| 33 | def duration(value: object) -> str: |
| 34 | if not isinstance(value, dict): |
| 35 | return "—" |
| 36 | seconds = value.get("secs") |
| 37 | nanoseconds = value.get("nanos") |
| 38 | if not isinstance(seconds, int) or not isinstance(nanoseconds, int): |
| 39 | return "—" |
| 40 | milliseconds = seconds * 1_000 + nanoseconds / 1_000_000 |
| 41 | if milliseconds < 1: |
| 42 | return f"{milliseconds * 1_000:.0f} µs" |
| 43 | return f"{milliseconds:.1f} ms" |
| 44 | |
| 45 | |
| 46 | def summary_values(results_dir: Path, output_dir: str) -> tuple[str, str, str, str]: |
no test coverage detected