Skip to content

Conversation

@JohnSwan1503
Copy link
Contributor

Per task (i.e. flight/json queries and dump job) instrumentation and metrics reporting.

TODO:

  • A better description of these changes
  • Reorganize the new metrics modules

JohnSwan1503 and others added 2 commits November 13, 2025 11:52
This commit consolidates the monitoring infrastructure into a cleaner,
more unified API:

**Runtime Context Consolidation:**
- Removed QueryRuntimeContext in favor of generic TaskRuntimeContext
- Moved TaskMetrics and performance monitoring methods to task_runtime_context.rs
- TaskRuntimeContext now supports all task types via TaskType enum

**Instrumentation Consolidation:**
- Removed InstrumentedQueryExecution in favor of generic InstrumentedTaskExecution
- Added convenience methods: for_query() and for_query_with_task_id()
- InstrumentedTaskExecution handles all task types (queries, dumps, compactions, etc.)

**Module Renaming:**
- Renamed task_context to task_type for clarity
- Avoids confusion with task_runtime_context
- Better reflects that the module contains the TaskType enum

**Performance Monitoring:**
- All metrics methods consolidated in TaskMetrics:
  - busy_duration_ms(), idle_duration_ms()
  - avg_poll_duration_us()
  - cpu_utilization(), cpu_utilization_f64()
  - Thread tracking and parallelism metrics

**API Improvements:**
- Single, consistent API for all instrumentation needs
- Query-specific shortcuts for common use cases
- Better separation of concerns between modules

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…s gathering

Signed-off-by: John Swanson <jswanson@edgeandnode.com>
@CLAassistant
Copy link

CLAassistant commented Nov 21, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants