feat: implement performance instrumentation v2#1285
Open
aviralgarg05 wants to merge 1 commit intoeigent-ai:mainfrom
Open
feat: implement performance instrumentation v2#1285aviralgarg05 wants to merge 1 commit intoeigent-ai:mainfrom
aviralgarg05 wants to merge 1 commit intoeigent-ai:mainfrom
Conversation
Wendong-Fan
reviewed
Feb 17, 2026
Contributor
Wendong-Fan
left a comment
There was a problem hiding this comment.
thanks @aviralgarg05 , could you share a sample PerfTimer output so we can analyze the current performance bottlenecks?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
Closes #911
Description
This PR implements comprehensive performance instrumentation across the Eigent backend and Electron startup process. It introduces a centralized
PerfTimerutility to capture execution durations and log them with context, enabling better bottleneck identification and observability.Key Changes:
backend/app/utils/perf_timer.pyproviding thePerfTimercontext manager and@perf_measuredecorator using standard Python logging.chat_service.py: Instrumented session start, workforce construction, and task decomposition.workforce.py: Instrumented the high-level task decomposition and workforce start logic.single_agent_worker.py: Instrumented overall task processing and specific agent steps.listen_chat_agent.py: Instrumented both synchronous and asynchronous agent steps and tool executions.backend/main.py: Added module load timing.electron/main/init.ts: Instrumented the backend spawn process and health check duration.backend/tests/unit/utils/test_perf_timer.pywith 19 test cases covering sync/async usage and exception handling.What is the purpose of this pull request?
Contribution Guidelines Acknowledgement