def parse_args()

in read_stall_retry/retry_count_vs_request_count.py [0:0]


def parse_args():
    """Parses command-line arguments."""
    parser = argparse.ArgumentParser(description="Analyze logs and count retries per request.")
    parser.add_argument(
        "--logs-path",
        type=str,
        required=True,
        help="Path to the logs (GCS or local path with wildcards) to analyze."
    )
    parser.add_argument(
        "--output-file",
        type=str,
        default="retry_count_vs_request_count.csv",
        help="Output CSV file to save the results."
    )
    parser.add_argument(
        "--workers",
        type=int,
        default=min(32, os.cpu_count() or 1), #Adjusting workers number.
        help="Number of worker threads for parallel processing."
    )
    return parser.parse_args()