@@ -362,7 +362,7 @@ def determine_best_candidate(
362
362
candidates = deque (candidates )
363
363
# Start a new thread for AI service request, start loop in main thread
364
364
# 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 :
366
366
future_line_profile_results = executor .submit (
367
367
self .aiservice_client .optimize_python_code_line_profiler ,
368
368
source_code = code_context .read_writable_code ,
@@ -382,8 +382,8 @@ def determine_best_candidate(
382
382
if done and (future_line_profile_results is not None ):
383
383
line_profile_results = future_line_profile_results .result ()
384
384
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 } " )
387
387
future_line_profile_results = None
388
388
candidate_index += 1
389
389
candidate = candidates .popleft ()
@@ -1086,8 +1086,8 @@ def run_and_parse_tests(
1086
1086
pytest_cmd = self .test_cfg .pytest_cmd ,
1087
1087
pytest_timeout = INDIVIDUAL_TESTCASE_TIMEOUT ,
1088
1088
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 ,
1091
1091
test_framework = self .test_cfg .test_framework ,
1092
1092
line_profiler_output_file = line_profiler_output_file ,
1093
1093
)
0 commit comments