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

support for specifying explicit prefix and/or substring filter in aggregations #239

Merged
merged 2 commits into from
Dec 4, 2017

Conversation

DanCech
Copy link
Contributor

@DanCech DanCech commented Nov 30, 2017

This is an implementation of an idea I had for reducing CPU usage when multiple regular-expression based aggregations are in use.

It allows the user to specify a prefixFilter and substringFilter in the aggregation config, and if specified they are used in preMatch to filter the series before passing them to the final regex. If prefixFilter isn't specified or is empty then the old behavior of deducing a prefix from the regular expression is used.

Copy link
Contributor

@Dieterbe Dieterbe left a comment

Choose a reason for hiding this comment

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

LGTM. my only remarks are that the comments for PreMatch and in Table.Print are no longer accurate

}
str += "\n"
return str
return strings.Repeat("=", amount) + "\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@Dieterbe
Copy link
Contributor

Dieterbe commented Dec 1, 2017

also, let's update the example ini file with these new options

@DanCech
Copy link
Contributor Author

DanCech commented Dec 4, 2017

@Dieterbe changes made, can you merge?

@DanCech DanCech changed the title [proposal] support for specifying explicit prefixFilter and/or substringFilter in aggregations support for specifying explicit prefixFilter and/or substringFilter in aggregations Dec 4, 2017
@DanCech DanCech changed the title support for specifying explicit prefixFilter and/or substringFilter in aggregations support for specifying explicit prefix and/or substring filter in aggregations Dec 4, 2017
@Dieterbe Dieterbe merged commit a4124d8 into grafana:master Dec 4, 2017
@Dieterbe
Copy link
Contributor

Dieterbe commented Dec 4, 2017

i have just added 1 commit : 20ce865

also, happy to report that both old addAgg format, as well as new, seems to work fine for me. it's nice that we remain backwards compat. thanks @DanCech !

@DanCech DanCech deleted the aggregationFilters branch December 4, 2017 15:18
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.

None yet

2 participants