| 74 | |
| 75 | |
| 76 | def parse_args() -> argparse.Namespace: |
| 77 | parser = argparse.ArgumentParser( |
| 78 | description="Generate throughput.png for Java xlang benchmark results" |
| 79 | ) |
| 80 | parser.add_argument( |
| 81 | "--json-file", |
| 82 | default="reports/benchmark_results.json", |
| 83 | help="JMH JSON output file", |
| 84 | ) |
| 85 | parser.add_argument( |
| 86 | "--output-dir", |
| 87 | default="reports", |
| 88 | help="Local directory for throughput.png", |
| 89 | ) |
| 90 | parser.add_argument( |
| 91 | "--docs-output-dir", |
| 92 | default=None, |
| 93 | help="Optional docs directory to receive only a copied throughput.png", |
| 94 | ) |
| 95 | return parser.parse_args() |
| 96 | |
| 97 | |
| 98 | def load_json(path: str) -> Any: |