Skip to content

Feat: Buffer Implementation#31

Merged
FW-Nagorko merged 12 commits into
develfrom
agent/buffer
Jun 5, 2026
Merged

Feat: Buffer Implementation#31
FW-Nagorko merged 12 commits into
develfrom
agent/buffer

Conversation

@FW-Nagorko
Copy link
Copy Markdown
Collaborator

This pull request introduces a new metrics buffering system and introduces a DeviceID tagging system. The main changes include implementing the buffer.h/buffer.cc system for efficient metrics storage and updating all collectors to use the new DeviceID type.

Metrics Buffering System:

  • Added new SeriesBuffer and MetricsBuffer classes in buffer.h/buffer.cc to efficiently store and manage time-series metric samples, including thread-safe access and snapshotting. [1] [2]
  • The MetricsBuffer maps MetricType and DeviceID combination to a corresponding SeriesBuffer.
  • The SeriesBuffer holds a ring buffer of Samples as well as write and read markers. It enables pushing new samples, getting a snapshot of unread metrics and acking the snapshot to advance the read marker.

DeviceID tagging

  • The Metric struct was updated to include a deviceId field that identifies the device that a measurement was performed on.
  • Collectors were updated to detect hardware and measure the requested metrics on all avaliable devices.
  • The combination of MetricType and DeviceID identifies metrics.

These changes enhance the flexibility, correctness, and maintainability of the agent's metrics collection and buffering infrastructure.

@FW-Nagorko FW-Nagorko requested review from kox13 and varev-dev June 4, 2026 12:50
Copy link
Copy Markdown
Contributor

@varev-dev varev-dev left a comment

Choose a reason for hiding this comment

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

lgtm

@FW-Nagorko FW-Nagorko merged commit c2454a4 into devel Jun 5, 2026
1 check passed
@FW-Nagorko FW-Nagorko deleted the agent/buffer branch June 5, 2026 09:44
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.

2 participants