@@ -362,7 +362,7 @@ def determine_best_candidate(
362362        candidates  =  deque (candidates )
363363        # Start a new thread for AI service request, start loop in main thread 
364364        # check if aiservice request is complete, when it is complete, append result to the candidates list 
365-         with  concurrent .futures .ThreadPoolExecutor (max_workers = 1 ) as  executor :
365+         with  concurrent .futures .ThreadPoolExecutor (max_workers = 2 ) as  executor :
366366            future_line_profile_results  =  executor .submit (
367367                self .aiservice_client .optimize_python_code_line_profiler ,
368368                source_code = code_context .read_writable_code ,
@@ -382,8 +382,8 @@ def determine_best_candidate(
382382                    if  done  and  (future_line_profile_results  is  not None ):
383383                        line_profile_results  =  future_line_profile_results .result ()
384384                        candidates .extend (line_profile_results )
385-                         original_len +=  len (candidates )
386-                         logger .info (f"Added results from line profiler to candidates, total candidates now: { original_len }  )
385+                         original_len +=  len (line_profile_results )
386+                         logger .info (f"Added { len ( line_profile_results ) }   results from line profiler to candidates, total candidates now: { original_len }  )
387387                        future_line_profile_results  =  None 
388388                    candidate_index  +=  1 
389389                    candidate  =  candidates .popleft ()
@@ -1086,8 +1086,8 @@ def run_and_parse_tests(
10861086                    pytest_cmd = self .test_cfg .pytest_cmd ,
10871087                    pytest_timeout = INDIVIDUAL_TESTCASE_TIMEOUT ,
10881088                    pytest_target_runtime_seconds = testing_time ,
1089-                     pytest_min_loops = 1 ,
1090-                     pytest_max_loops = 1 ,
1089+                     pytest_min_loops = pytest_min_loops ,
1090+                     pytest_max_loops = pytest_min_loops ,
10911091                    test_framework = self .test_cfg .test_framework ,
10921092                    line_profiler_output_file = line_profiler_output_file ,
10931093                )
0 commit comments