Dump per-line expression type checking stats.
(path: str, graph: Graph)
| 4201 | |
| 4202 | |
| 4203 | def dump_line_checking_stats(path: str, graph: Graph) -> None: |
| 4204 | """Dump per-line expression type checking stats.""" |
| 4205 | with open(path, "w") as f: |
| 4206 | for id in sorted(graph): |
| 4207 | if not graph[id].per_line_checking_time_ns: |
| 4208 | continue |
| 4209 | f.write(f"{id}:\n") |
| 4210 | for line in sorted(graph[id].per_line_checking_time_ns): |
| 4211 | line_time = graph[id].per_line_checking_time_ns[line] |
| 4212 | f.write(f"{line:>5} {line_time/1000:8.1f}\n") |
| 4213 | |
| 4214 | |
| 4215 | def dump_graph(graph: Graph, stdout: TextIO | None = None) -> None: |
no test coverage detected
searching dependent graphs…