()
| 426 | |
| 427 | |
| 428 | def main(): |
| 429 | # Accept output directory as argument, default to ./results |
| 430 | if len(sys.argv) > 1: |
| 431 | output_dir = Path(sys.argv[1]) |
| 432 | else: |
| 433 | output_dir = Path(__file__).parent / "results" |
| 434 | |
| 435 | # Try to parse results |
| 436 | txt_path = output_dir / "benchmark_results.txt" |
| 437 | json_path = output_dir / "benchmark_results.json" |
| 438 | |
| 439 | results = None |
| 440 | |
| 441 | if txt_path.exists(): |
| 442 | print(f"Parsing {txt_path}...") |
| 443 | results = parse_benchmark_txt(txt_path) |
| 444 | elif json_path.exists(): |
| 445 | print(f"Parsing {json_path}...") |
| 446 | results = parse_benchmark_json(json_path) |
| 447 | else: |
| 448 | print("Error: No benchmark results found.") |
| 449 | print("Run ./run.sh first to generate benchmark results.") |
| 450 | sys.exit(1) |
| 451 | |
| 452 | if not results: |
| 453 | print("Error: Could not parse benchmark results.") |
| 454 | sys.exit(1) |
| 455 | |
| 456 | print("Parsed results for data types:", list(results.keys())) |
| 457 | |
| 458 | # Generate outputs |
| 459 | generate_combined_plot(results, output_dir) |
| 460 | generate_markdown_report(results, output_dir) |
| 461 | |
| 462 | print("Done!") |
| 463 | |
| 464 | |
| 465 | if __name__ == "__main__": |
no test coverage detected