()
| 228 | |
| 229 | |
| 230 | def main() -> None: |
| 231 | args = parse_args() |
| 232 | result = profile_single_spawn(args.binary, args.cwd, args.timeout) |
| 233 | if args.json: |
| 234 | print(json.dumps(result, indent=2)) |
| 235 | return |
| 236 | |
| 237 | print(f"temp root: {result['temp_root']}") |
| 238 | print(f"session id: {result['session_id']}") |
| 239 | print(f"log path: {result['log_path']}") |
| 240 | if result["first_output_ms"] is not None: |
| 241 | print(f"first output: {result['first_output_ms']:.1f}ms") |
| 242 | else: |
| 243 | print("first output: none") |
| 244 | print("timings:") |
| 245 | for line in result["timing_lines"]: |
| 246 | print(f" {line}") |
| 247 | |
| 248 | |
| 249 | if __name__ == "__main__": |
no test coverage detected