132132    ), 
133133) 
134134@click .option ( 
135-     "--output-path" , 
135+     "--output-report- path" , 
136136    type = str , 
137137    default = None , 
138138    help = ( 
142142        "printed to the console."  
143143    ), 
144144) 
145+ @click .option ( 
146+     "--output-data-path" , 
147+     type = str , 
148+     default = None , 
149+     help = ( 
150+         "The output path to save flat data results. "  
151+         "Ex: --output-data-path=data.csv"  
152+         "The default is None, meaning a file won't be generated."  
153+     ), 
154+ ) 
145155@click .option ( 
146156    "--enable-continuous-refresh" , 
147157    is_flag = True , 
@@ -162,7 +172,8 @@ def generate_benchmark_report_cli(
162172    rate : Optional [float ],
163173    max_seconds : Optional [int ],
164174    max_requests : Optional [int ],
165-     output_path : str ,
175+     output_report_path : str ,
176+     output_data_path : str ,
166177    enable_continuous_refresh : bool ,
167178):
168179    """ 
@@ -179,7 +190,8 @@ def generate_benchmark_report_cli(
179190        rate = rate ,
180191        max_seconds = max_seconds ,
181192        max_requests = max_requests ,
182-         output_path = output_path ,
193+         output_report_path = output_report_path ,
194+         output_data_path = output_data_path ,
183195        cont_refresh_table = enable_continuous_refresh ,
184196    )
185197
@@ -195,7 +207,8 @@ def generate_benchmark_report(
195207    rate : Optional [float ],
196208    max_seconds : Optional [int ],
197209    max_requests : Optional [int ],
198-     output_path : str ,
210+     output_report_path : str ,
211+     output_data_path : str ,
199212    cont_refresh_table : bool ,
200213) ->  GuidanceReport :
201214    """ 
@@ -216,6 +229,7 @@ def generate_benchmark_report(
216229    :param max_seconds: Maximum duration for each benchmark run in seconds. 
217230    :param max_requests: Maximum number of requests per benchmark run. 
218231    :param output_path: Path to save the output report file. 
232+     :param output_csv_path: Path to save the flat output data. 
219233    :param cont_refresh_table: Continually refresh the table in the CLI 
220234        until the user exits. 
221235    """ 
@@ -224,7 +238,7 @@ def generate_benchmark_report(
224238    )
225239
226240    # Create backend 
227-     backend_inst  =  Backend .create (
241+     backend_inst :  Backend  =  Backend .create (
228242        backend_type = backend ,
229243        target = target ,
230244        model = model ,
@@ -284,11 +298,14 @@ def generate_benchmark_report(
284298    guidance_report  =  GuidanceReport ()
285299    guidance_report .benchmarks .append (report )
286300
287-     if  output_path :
288-         guidance_report .save_file (output_path )
301+     if  output_report_path :
302+         guidance_report .save_file (output_report_path )
303+ 
304+     if  output_data_path :
305+         guidance_report .save_file (output_report_path )
289306
290307    guidance_report .print (
291-         save_path = output_path  if  output_path  is  not None  else  "stdout" ,
308+         save_path = output_report_path  if  output_report_path  is  not None  else  "stdout" ,
292309        continual_refresh = cont_refresh_table ,
293310    )
294311
0 commit comments