mirror of
https://github.com/Magnus167/rustframe.git
synced 2025-10-04 22:39:26 +00:00
Add dry run option to custom benchmark report script and update workflow to use it
This commit is contained in:
11
.github/scripts/custom_benchmark_report.py
vendored
11
.github/scripts/custom_benchmark_report.py
vendored
@@ -346,6 +346,11 @@ if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Load Criterion benchmark results from JSON files and generate an HTML table with links to reports."
|
||||
)
|
||||
parser.add_argument(
|
||||
"--dry-run",
|
||||
action="store_true",
|
||||
help="Perform a dry run without writing the HTML file.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--criterion-dir",
|
||||
type=str,
|
||||
@@ -372,6 +377,12 @@ if __name__ == "__main__":
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.dry_run:
|
||||
print(
|
||||
"Dry run mode: No files will be written. Use --dry-run to skip writing the HTML file."
|
||||
)
|
||||
sys.exit(0)
|
||||
|
||||
criterion_path = Path(args.criterion_dir)
|
||||
output_file_path = Path(args.output_file)
|
||||
|
||||
|
Reference in New Issue
Block a user