@@ -377,7 +377,7 @@ def determine_best_candidate(
377377        candidates  =  deque (candidates )
378378        # Start a new thread for AI service request, start loop in main thread 
379379        # check if aiservice request is complete, when it is complete, append result to the candidates list 
380-         with  concurrent .futures .ThreadPoolExecutor (max_workers = 1 ) as  executor :
380+         with  concurrent .futures .ThreadPoolExecutor (max_workers = 2 ) as  executor :
381381            future_line_profile_results  =  executor .submit (
382382                self .aiservice_client .optimize_python_code_line_profiler ,
383383                source_code = code_context .read_writable_code ,
@@ -397,8 +397,8 @@ def determine_best_candidate(
397397                    if  done  and  (future_line_profile_results  is  not   None ):
398398                        line_profile_results  =  future_line_profile_results .result ()
399399                        candidates .extend (line_profile_results )
400-                         original_len +=  len (candidates )
401-                         logger .info (f"Added results from line profiler to candidates, total candidates now: { original_len }  " )
400+                         original_len +=  len (line_profile_results )
401+                         logger .info (f"Added { len ( line_profile_results ) }   results from line profiler to candidates, total candidates now: { original_len }  " )
402402                        future_line_profile_results  =  None 
403403                    candidate_index  +=  1 
404404                    candidate  =  candidates .popleft ()
@@ -1126,8 +1126,8 @@ def run_and_parse_tests(
11261126                    pytest_cmd = self .test_cfg .pytest_cmd ,
11271127                    pytest_timeout = INDIVIDUAL_TESTCASE_TIMEOUT ,
11281128                    pytest_target_runtime_seconds = testing_time ,
1129-                     pytest_min_loops = 1 ,
1130-                     pytest_max_loops = 1 ,
1129+                     pytest_min_loops = pytest_min_loops ,
1130+                     pytest_max_loops = pytest_min_loops ,
11311131                    test_framework = self .test_cfg .test_framework ,
11321132                    line_profiler_output_file = line_profiler_output_file ,
11331133                )
0 commit comments