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

Improve tailer matcher function. #2959

Merged
merged 1 commit into from
Nov 20, 2020

Conversation

cyriltovena
Copy link
Contributor

Don't create a map on every new push of a stream or appearance of a new stream.

 benchcmp before.txt after.txt
benchmark                   old ns/op     new ns/op     delta
Benchmark_PushStream-16     10942         10801         -1.29%

benchmark                   old allocs     new allocs     delta
Benchmark_PushStream-16     6              4              -33.33%

benchmark                   old bytes     new bytes     delta
Benchmark_PushStream-16     4440          4427          -0.29%

Signed-off-by: Cyril Tovena cyril.tovena@gmail.com

Don't create a map on every new push of a stream or appearance of a new stream.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Copy link
Contributor

@sandeepsukhani sandeepsukhani left a comment

Choose a reason for hiding this comment

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

LGTM

@cyriltovena cyriltovena merged commit a62f81f into grafana:master Nov 20, 2020
cyriltovena pushed a commit to cyriltovena/loki that referenced this pull request Jun 11, 2021
* Added support for Redis Cluster and Redis Sentinel (grafana#2959)

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* addressed comments

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* fixed 'make doc'

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* fixed 'make lint'

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* updated Changelog

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* updated Changelog

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* updated go.mod

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* addressed comments

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* removed deprecated flags in redis config

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* updated modules

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* updated modules

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* added warning when Redis sentinel returns unexpected master info

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* fixed 'make lint'

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* updated unit test

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* added master group name to Redis Sentinel config

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* updated config validation

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* use redis universal client

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* updated dependencies

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* remove obsolete interface

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* addressed comments

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* add Redis DB index selection

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* updated CHANGELOG

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>

* Fixed CHANGELOG

Signed-off-by: Marco Pracucci <marco@pracucci.com>

Co-authored-by: Marco Pracucci <marco@pracucci.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants