diff --git a/test/srt/parse_results.py b/test/srt/parse_results.py index e6ff16a51..f552739f5 100644 --- a/test/srt/parse_results.py +++ b/test/srt/parse_results.py @@ -8,6 +8,11 @@ from tabulate import tabulate # Parse command-line arguments parser = argparse.ArgumentParser(description="Parse JSONL benchmark and summarize.") parser.add_argument("input_file", type=str, help="Path to input JSONL file") +parser.add_argument( + "--md", + action="store_true", + help="If set, print the summary table in Markdown format (GitHub style)", +) args = parser.parse_args() input_file = args.input_file @@ -44,5 +49,9 @@ df = pd.DataFrame(results) df.to_csv(output_file, index=False) print(f"\nSaved summary to: {output_file}\n") -# Print ASCII table -print(tabulate(df, headers="keys", tablefmt="grid", floatfmt=".3f")) +if args.md: + # Print Markdown table + print(tabulate(df, headers="keys", tablefmt="github", floatfmt=".3f")) +else: + # Print ASCII table + print(tabulate(df, headers="keys", tablefmt="grid", floatfmt=".3f"))