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

Create accessors to first/last data points #513

Merged
merged 2 commits into from Sep 6, 2022
Merged

Create accessors to first/last data points #513

merged 2 commits into from Sep 6, 2022

Conversation

rtwalker
Copy link
Contributor

Resolves #512

We can continue bike shedding the names either here or in the linked issue.

Just wanted to get the PR up.

These accessors expose the two fields (ts, val) of the TSPoints in
each of the "first" and "last" fields for both TimeWeightSummary and
CounterAgg.
extension/src/counter_agg.rs Outdated Show resolved Hide resolved
last_time(timeweightsummary),
last_val(),
last_val(countersummary),
last_val(timeweightsummary),
Copy link
Contributor

Choose a reason for hiding this comment

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

It really is interesting to see how much a simple feature costs.

extension/src/time_weighted_average.rs Outdated Show resolved Hide resolved
@epgts
Copy link
Contributor

epgts commented Sep 1, 2022

Does it make sense to have this for counter_agg but not gauge_agg?

extension/src/counter_agg.rs Outdated Show resolved Hide resolved
@rtwalker
Copy link
Contributor Author

rtwalker commented Sep 6, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 6, 2022

Build succeeded:

@bors bors bot merged commit cf85c41 into main Sep 6, 2022
@bors bors bot deleted the rw/first-and-last branch September 6, 2022 18:53
@rtwalker
Copy link
Contributor Author

rtwalker commented Sep 6, 2022

Does it make sense to have this for counter_agg but not gauge_agg?

Discussed at standup today where it was agreed that it makes sense to wait on #523 to be sorted out before adding these functions to gauge_agg.

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.

Accessors to retrieve first and last data points from TimeWeightSummary
2 participants