Skip to content

Commit 626be4d

Browse files
committed
use the class parser directly
1 parent 22b5f02 commit 626be4d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

codeflash/verification/parse_line_profile_test_output.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,4 @@ def show_text_non_python(stats: dict, line_contents: dict[tuple[str, int], str])
112112
)
113113
out_table += "\n"
114114
return out_table
115+

tests/test_parse_line_profile_test_output.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from codeflash.languages import set_current_language
66
from codeflash.languages.base import Language
7-
from codeflash.verification.parse_line_profile_test_output import parse_line_profile_results
7+
from codeflash.languages.java.line_profiler import JavaLineProfiler
88

99

1010
def test_parse_line_profile_results_non_python_java_json():
@@ -42,7 +42,7 @@ def test_parse_line_profile_results_non_python_java_json():
4242
}
4343
profile_file.write_text(json.dumps(profile_data), encoding="utf-8")
4444

45-
results, _ = parse_line_profile_results(profile_file)
45+
results = JavaLineProfiler.parse_results(profile_file)
4646

4747
assert results["unit"] == 1e-9
4848
assert results["str_out"] == (
@@ -56,4 +56,3 @@ def test_parse_line_profile_results_non_python_java_json():
5656
)
5757
assert (source_file.as_posix(), 3, "Util.java") in results["timings"]
5858
assert results["timings"][(source_file.as_posix(), 3, "Util.java")] == [(3, 6, 1000), (4, 6, 2000)]
59-

0 commit comments

Comments
 (0)