| 105 | |
| 106 | |
| 107 | def parse_args() -> argparse.Namespace: |
| 108 | parser = argparse.ArgumentParser( |
| 109 | description="Serve the load-test dashboard and discovered load-test data." |
| 110 | ) |
| 111 | parser.add_argument( |
| 112 | "--root", |
| 113 | default=str(LOADTEST_DIR), |
| 114 | help="Directory to scan for load-test JSON, CSV, and NDJSON files.", |
| 115 | ) |
| 116 | parser.add_argument("--host", default="127.0.0.1", help="Host interface to bind.") |
| 117 | parser.add_argument("--port", type=int, default=8765, help="Port to bind.") |
| 118 | parser.add_argument( |
| 119 | "--no-open", |
| 120 | action="store_true", |
| 121 | help="Do not automatically open the dashboard in the default browser.", |
| 122 | ) |
| 123 | return parser.parse_args() |
| 124 | |
| 125 | |
| 126 | def main() -> int: |