@@ -61,6 +61,14 @@ def lorust_performance_action_handler(
6161 for i in range (l , r + 1 ):
6262 actions_to_execute .append (i - 1 ) #[9,10,11,12,13,14]
6363
64+ if max_tasks is None :
65+ CommonUtil .ExecLog (
66+ sModuleInfo ,
67+ "`max tasks` parameter is missing" ,
68+ 3 ,
69+ )
70+ return "zuez_failed"
71+
6472 def find_row_by (
6573 action : List [List [str ]],
6674 left : str | None = None ,
@@ -86,7 +94,8 @@ def find_row_by(
8694 load_gen_function = {
8795 "spawn_rate" : spawn_rate ,
8896 "timeout" : timeout ,
89- "functions_to_execute" : []
97+ "max_tasks" : max_tasks ,
98+ "functions_to_execute" : [],
9099 }
91100 flow = {
92101 "functions" : [
@@ -213,8 +222,12 @@ def find_row_by(
213222 metrics_output_path = save_path / "lorust_performance_report"
214223 metrics_output_path .mkdir (parents = True , exist_ok = True )
215224
216- flow_save_path = metrics_output_path / "flow.json"
217- metrics_output_json_path = metrics_output_path / "http.json"
225+ step_no : int = CommonUtil .current_step_sequence # type: ignore
226+ action_no : int = CommonUtil .current_action_no # type: ignore
227+ tc_id : str = CommonUtil .current_tc_no
228+ file_name_prefix = f"{ tc_id } _STEP-{ step_no } _ACTION-{ action_no } "
229+ flow_save_path = metrics_output_path / f"{ file_name_prefix } _flow.json"
230+ metrics_output_json_path = metrics_output_path / f"{ file_name_prefix } _http.json"
218231
219232 # Save the flow configuration
220233 with open (flow_save_path , "w" ) as f :
@@ -237,11 +250,16 @@ def find_row_by(
237250 binary_name = f"lorust_{ uname .system } _{ uname .machine } .exe"
238251 lorust_path = lorust_path / binary_name
239252
240- subprocess .run (' ' .join ([
241- str (lorust_path ),
242- f"--output-path { metrics_output_path } " ,
243- f"--flow-path { flow_save_path } " ,
244- ]), shell = True )
253+ subprocess .run (
254+ " " .join (
255+ [
256+ str (lorust_path ),
257+ f"--output-path { metrics_output_json_path } " ,
258+ f"--flow-path { flow_save_path } " ,
259+ ]
260+ ),
261+ shell = True ,
262+ )
245263
246264 testendtime = time .perf_counter ()
247265 duration = testendtime - teststarttime
@@ -296,7 +314,7 @@ def create_html_report(
296314
297315 step_no : int = CommonUtil .current_step_sequence # type: ignore
298316 action_no : int = CommonUtil .current_action_no # type: ignore
299- file_name = report_save_path / f"{ tc_id } _STEP-{ step_no } _ACTION-{ action_no } .html"
317+ file_name = report_save_path / f"{ tc_id } _STEP-{ step_no } _ACTION-{ action_no } _report .html"
300318
301319 with open (file_name , "w" , encoding = "utf-8" ) as file :
302320 file .write (html )
0 commit comments