Skip to content

Commit 981418e

Browse files
aseembits93Codeflash Bot
authored andcommitted
wip
1 parent 630ca8a commit 981418e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

codeflash/optimization/function_optimizer.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import subprocess
99
import time
1010
import uuid
11-
from collections import defaultdict
11+
from collections import Counter, defaultdict
1212
from pathlib import Path
1313
from typing import TYPE_CHECKING
1414

@@ -1401,6 +1401,13 @@ def process_review(
14011401
generated_tests = remove_functions_from_generated_tests(
14021402
generated_tests=generated_tests, test_functions_to_remove=test_functions_to_remove
14031403
)
1404+
map_gen_test_file_to_no_of_tests = Counter()
1405+
for gen_test_result in original_code_baseline.behavior_test_results:
1406+
if (
1407+
"__unit_test_" in gen_test_result.file_name
1408+
and gen_test_result.id.test_function_name not in test_functions_to_remove
1409+
):
1410+
map_gen_test_file_to_no_of_tests[gen_test_result.file_name] += 1
14041411

14051412
original_runtime_by_test = original_code_baseline.benchmarking_test_results.usable_runtime_data_by_test_case()
14061413
optimized_runtime_by_test = (

0 commit comments

Comments
 (0)