Skip to content

Fix metrics reporting for UDT#385

Merged
matteius merged 1 commit intoopensensor:mainfrom
dpw13:fix/udt-metrics
Apr 16, 2026
Merged

Fix metrics reporting for UDT#385
matteius merged 1 commit intoopensensor:mainfrom
dpw13:fix/udt-metrics

Conversation

@dpw13
Copy link
Copy Markdown
Contributor

@dpw13 dpw13 commented Apr 14, 2026

  • Fix reporting of sparklines for metrics
  • Allocate metrics slot for any metrics reporting
  • Instrument UDT with some basic metrics
  • Adds minor smoothing to fps and bitrate metrics

* Fix reporting of sparklines for metrics
* Allocate metrics slot for any metrics reporting
* Instrument UDT with some basic metrics
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes and expands stream metrics reporting (including sparklines) by ensuring metrics slots are allocated when metrics are recorded, instrumenting Unified Detection Thread (UDT) with basic metrics, and adding smoothing to reported FPS/bitrate values.

Changes:

  • Fix /api/health?sparklines=... handling to correctly detect the query parameter.
  • Instrument UDT to record per-packet/frame metrics and recording lifecycle metrics.
  • Update metrics slot allocation behavior and add basic EMA smoothing for FPS/bitrate sampling.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/web/api_handlers_health.c Fixes query-param handling for enabling sparklines in the health response.
src/video/unified_detection_thread.c Adds stream metrics recording (frames/bytes) and recording lifecycle metrics for UDT.
src/video/stream_state.c Removes explicit metrics slot pre-allocation; relies on allocation via metrics APIs.
src/telemetry/stream_metrics.c Changes slot allocation strategy, adds smoothing to sampled FPS/bitrate, and adjusts configured FPS usage.
include/telemetry/stream_metrics.h Removes the public metrics_get_slot API from the header.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/telemetry/stream_metrics.c
Comment thread src/telemetry/stream_metrics.c
Comment thread src/video/unified_detection_thread.c
@matteius matteius merged commit 5612879 into opensensor:main Apr 16, 2026
5 checks passed
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