Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update metriken to replace heatmaps #52

Merged
merged 33 commits into from
Oct 17, 2023
Merged

Conversation

brayniac
Copy link
Contributor

Updates metriken library to replace heatmaps with histograms which have better runtime performance characteristics and lower memory footprint.

Updates metriken library to replace heatmaps with histograms which
have better runtime performance characteristics and lower memory
footprint.
@brayniac brayniac marked this pull request as draft September 27, 2023 18:04
src/metrics/mod.rs Fixed Show fixed Hide fixed
src/metrics/mod.rs Fixed Show fixed Hide fixed
src/output/mod.rs Fixed Show fixed Hide fixed
src/output/mod.rs Fixed Show fixed Hide fixed
@brayniac brayniac marked this pull request as ready for review October 11, 2023 22:08
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

clippy found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

src/main.rs Fixed Show fixed Hide fixed
src/main.rs Fixed Show fixed Hide fixed
src/main.rs Fixed Show fixed Hide fixed
src/main.rs Fixed Show fixed Hide fixed
Cargo.toml Outdated Show resolved Hide resolved
pub m: u32,
pub r: u32,
pub n: u32,
pub grouping_power: u8,
Copy link
Contributor

Choose a reason for hiding this comment

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

I might end up changing this to include the entire Config when we move this to rustcommon, but I think this is fine for now.

lib/dataspec/src/lib.rs Outdated Show resolved Hide resolved
Changes the behavior to keep just a single set of previous
snapshots and cached deltas.

We assume secondly collection and will serve percentiles up to one
second stale, but with timestamps in the prometheus format to aid
in correlating with other metrics.
src/output/mod.rs Outdated Show resolved Hide resolved
src/metrics/mod.rs Outdated Show resolved Hide resolved
src/admin/mod.rs Outdated Show resolved Hide resolved
src/metrics/mod.rs Outdated Show resolved Hide resolved
src/metrics/mod.rs Outdated Show resolved Hide resolved
src/metrics/mod.rs Outdated Show resolved Hide resolved
pub deltas: HashMap<String, metriken::histogram::Snapshot>,
}

pub struct MetricsSnapshot {
Copy link
Contributor

@mihirn mihirn Oct 13, 2023

Choose a reason for hiding this comment

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

Just to make sure I understand: now when the admin thread serves out snapshotted metrics from METRICS_SNAPSHOT, both histogram and counter values will be from the snapshot (and potentially upto 1s stale), as opposed to the previous version where counters would be fresh and the histogram from the snapshot, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. The admin thread will still serve fresh counters + gauges, but stale percentiles (with timestamps for percentile metrics only). See L#272 in admin/mod.rs.

This means that each polling agent may see the counters at different points in time. I don't have a strong objection to serving counters + gauges from the metrics snapshot, but would prefer to increase the refresh frequency.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ack. I'm fine with it the way it is -- was mostly just trying to wrap my head around the semantics of what to expect.

@brayniac brayniac merged commit 55c0f3b into iopsystems:main Oct 17, 2023
12 checks passed
@brayniac brayniac deleted the metriken branch October 17, 2023 21:50
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