| 36 | |
| 37 | |
| 38 | def parse_args() -> argparse.Namespace: |
| 39 | parser = argparse.ArgumentParser(description="Generate LaTeX RD table from dynamic benchmark statistics.") |
| 40 | parser.add_argument( |
| 41 | "--input", |
| 42 | type=Path, |
| 43 | default=Path("open_stats/dyn_rd.json"), |
| 44 | help="Path to the input JSON file.", |
| 45 | ) |
| 46 | parser.add_argument( |
| 47 | "--output", |
| 48 | type=Path, |
| 49 | default=Path("tools/dyn_bench/dyn_rd_table.tex"), |
| 50 | help="Path to the output LaTeX file.", |
| 51 | ) |
| 52 | parser.add_argument( |
| 53 | "--pdf", |
| 54 | type=Path, |
| 55 | default=None, |
| 56 | help="Optional path to the output PDF file.", |
| 57 | ) |
| 58 | return parser.parse_args() |
| 59 | |
| 60 | |
| 61 | def load_stats(json_path: Path) -> OrderedDict: |