Add performance agent (N+1 queries, O(n²) loops, I/O in loops, missing indexes) #36
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
WuMing lacks a reviewer for runtime performance regressions. A performance agent would examine changed source and SQL files for: N+1 ORM loop patterns, nested loops over large collections (O(n²)), file/network/DB I/O executed per iteration, and new query patterns that imply a missing index. This is AI reasoning about the diff — distinct from static analysis tools.
Findings from codebase exploration:
BaseAgentinsrc/wuming/agents/base.py; onlyname,file_patterns, andsystem_promptclass attributes need to be set —review()is inheritedfnmatch.fnmatchis used for pattern matching —**recursive globs do not work; flat wildcards only*.py; only extra pattern needed is*.sqlAGENT_REGISTRYdict inrouter.pytests/test_agents.pyusing the tryke patternPlan of attack:
feat/issue-36-37-performance-tests-agentssrc/wuming/agents/performance.py—PerformanceAgentsubclass with N+1/O(n²)/I-O-in-loops/missing-index promptsrc/wuming/agents/tests_agent.py—TestsAgentsubclass targeting all source languages; prompt covers assertion quality + coverage gapsrouter.pyCLAUDE.mdenv var docs andREADME.mdagents tabletests/test_agents.pyImprovements.md