Skip to content

Commit 2570a2e

Browse files
authored
Apply suggestion from @aseembits93
1 parent fc5274d commit 2570a2e

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

codeflash/api/aiservice.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -577,13 +577,6 @@ def get_optimization_impact(
577577
]
578578
)
579579
code_diff = f"```diff\n{diff_str}\n```"
580-
# TODO get complexity metrics and fn call heuristics -> constructing a complete static call graph can be expensive for really large repos
581-
# grep function name in codebase -> ast parser to get no of calls and no of calls in loop -> radon lib to get complexity metrics -> send as additional context to the AI service
582-
# metric 1 -> call count - how many times the function is called in the codebase
583-
# metric 2 -> loop call count - how many times the function is called in a loop in the codebase
584-
# metric 3 -> presence of decorators like @profile, @cache -> this means the owner of the repo cares about the performance of this function
585-
# metric 4 -> cyclomatic complexity (https://en.wikipedia.org/wiki/Cyclomatic_complexity)
586-
# metric 5 (for future) -> halstead complexity (https://en.wikipedia.org/wiki/Halstead_complexity_measures)
587580
logger.info("!lsp|Computing Optimization Impact…")
588581
payload = {
589582
"code_diff": code_diff,

0 commit comments

Comments
 (0)