Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions benchmarks/decoders/benchmark_decoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import argparse
import importlib.resources
import json
import os
import platform
from pathlib import Path
Expand Down Expand Up @@ -106,6 +107,12 @@ def main() -> None:
default=False,
action=argparse.BooleanOptionalAction,
)
parser.add_argument(
"--output-json",
help="Output the results to a JSON file",
type=str,
default="",
)

args = parser.parse_args()
specified_decoders = set(args.decoders.split(","))
Expand Down Expand Up @@ -146,6 +153,10 @@ def main() -> None:
min_runtime_seconds=args.min_run_seconds,
benchmark_video_creation=args.bm_video_creation,
)
if args.output_json:
with open(args.output_json, "w") as f:
json.dump(results, f, indent=2)

data = {
"experiments": results,
"system_metadata": {
Expand Down
Loading