docs(conductor): Synchronize docs for track 'GUI Performance Profiling & Optimization'
This commit is contained in:
19
scripts/tasks/instrument_controller_profiling.toml
Normal file
19
scripts/tasks/instrument_controller_profiling.toml
Normal file
@@ -0,0 +1,19 @@
|
||||
[task]
|
||||
role = "tier3-worker"
|
||||
prompt = """In src/app_controller.py, add internal conditional profiling hooks to key background thread methods: _run_event_loop and _handle_request_event.
|
||||
|
||||
PATTERN:
|
||||
At the very beginning of the method:
|
||||
if hasattr(self, 'perf_monitor') and getattr(self, 'perf_profiling_enabled', False):
|
||||
self.perf_monitor.start_component("_method_name")
|
||||
|
||||
Immediately before EVERY 'return' statement AND at the very end of the method:
|
||||
if hasattr(self, 'perf_monitor') and getattr(self, 'perf_profiling_enabled', False):
|
||||
self.perf_monitor.end_component("_method_name")
|
||||
|
||||
CRITICAL:
|
||||
1. DO NOT use try...finally.
|
||||
2. Use exactly 1-space indentation for all Python code.
|
||||
3. Replace _method_name with the actual name of the method.
|
||||
4. Note that AppController has self.perf_monitor and self.perf_profiling_enabled (ensure you check for existence if they are initialized late).
|
||||
"""
|
||||
16
scripts/tasks/instrument_gui_profiling.toml
Normal file
16
scripts/tasks/instrument_gui_profiling.toml
Normal file
@@ -0,0 +1,16 @@
|
||||
[task]
|
||||
role = "tier3-worker"
|
||||
prompt = """In src/gui_2.py, add internal conditional profiling hooks to all remaining rendering methods: _render_projects_panel, _render_files_panel, _render_screenshots_panel, _render_provider_panel, _render_token_budget_panel, _render_cache_panel, _render_tool_analytics_panel, _render_session_insights_panel, _render_message_panel, _render_response_panel, _render_comms_history_panel, _render_tool_calls_panel, _render_tier_stream_panel, and _render_theme_panel.
|
||||
|
||||
PATTERN:
|
||||
At the very beginning of the method:
|
||||
if self.perf_profiling_enabled: self.perf_monitor.start_component("_method_name")
|
||||
|
||||
Immediately before EVERY 'return' statement AND at the very end of the method:
|
||||
if self.perf_profiling_enabled: self.perf_monitor.end_component("_method_name")
|
||||
|
||||
CRITICAL:
|
||||
1. DO NOT use try...finally.
|
||||
2. Use exactly 1-space indentation for all Python code.
|
||||
3. Replace _method_name with the actual name of the method (e.g., _render_projects_panel).
|
||||
"""
|
||||
Reference in New Issue
Block a user