You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: codeflash/api/aiservice.py
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -577,6 +577,13 @@ def get_optimization_impact(
577
577
]
578
578
)
579
579
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
0 commit comments