File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 66
77import argparse
88import importlib .resources
9+ import json
910import os
1011import platform
1112from pathlib import Path
@@ -106,6 +107,12 @@ def main() -> None:
106107 default = False ,
107108 action = argparse .BooleanOptionalAction ,
108109 )
110+ parser .add_argument (
111+ "--output-json" ,
112+ help = "Output the results to a JSON file" ,
113+ type = str ,
114+ default = "" ,
115+ )
109116
110117 args = parser .parse_args ()
111118 specified_decoders = set (args .decoders .split ("," ))
@@ -146,6 +153,10 @@ def main() -> None:
146153 min_runtime_seconds = args .min_run_seconds ,
147154 benchmark_video_creation = args .bm_video_creation ,
148155 )
156+ if args .output_json :
157+ with open (args .output_json , "w" ) as f :
158+ json .dump (results , f , indent = 2 )
159+
149160 data = {
150161 "experiments" : results ,
151162 "system_metadata" : {
You can’t perform that action at this time.
0 commit comments