Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Adds aggregateWithWildcards (and sum / multiply / avg) #1863

Merged
merged 7 commits into from
Aug 7, 2020

Conversation

robert-milan
Copy link
Contributor

This PR adds aggregateWithWildcards and sumSeriesWithWildcards, multiplySeriesWithWildcards, and averageSeriesWithWildcards

I have tested it locally against sumSeries, averageSeries, and multiplySeries and it appears to be working properly.

@Dieterbe
Copy link
Contributor

Dieterbe commented Aug 5, 2020

in docker-dev, issuing this query averageSeriesWithWildcards(perSecond(metrictank.stats.docker-env.default.api.request.*.status.*.counter32), 6)

on graphite, I get these 2 series:

perSecond(metrictank.stats.docker-env.default.api.request.status.200.counter32)
perSecond(metrictank.stats.docker-env.default.api.request.status.404.counter32)

on MT, I get:

averageSeries(metrictank.stats.docker-env.default.api.request.status.200.counter32)
averageSeries(perSecond(metrictank.stats.docker-env.default.api.request.*.status.*.counter32))

test-robert

expr/parse.go Outdated Show resolved Hide resolved
expr/parse.go Outdated Show resolved Hide resolved
expr/parse.go Outdated Show resolved Hide resolved
expr/parse.go Outdated Show resolved Hide resolved
@Dieterbe
Copy link
Contributor

Dieterbe commented Aug 5, 2020

@robert-milan I added some commits. now it seems to work like graphite in all my tests.
I think it's good now. what do you think?
I have used this dashboard for testing: https://gist.github.com/Dieterbe/f7f9375aafa2173923c5250224f73e7e

@shanson7
Copy link
Collaborator

shanson7 commented Aug 5, 2020

FWIW I used https://github.com/shanson7/mtcmptest to compare MT and graphite responses

@robert-milan
Copy link
Contributor Author

Thanks Dieter, looks good.

@Dieterbe Dieterbe merged commit 001015d into master Aug 7, 2020
@Dieterbe Dieterbe deleted the add-sum-series-with-wildcards branch August 7, 2020 16:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants