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

perf(checker): add fetching metrics values in pipe #1029

Merged
merged 5 commits into from
May 30, 2024

Conversation

almostinf
Copy link
Member

@almostinf almostinf commented May 23, 2024

Add fetching metrics values in pipe

Added fetching metrics to the redis pipeline

In addition, conducted benchmarks testing the performance of the solution on N number of unique metrics with 10 points each, the solution with pipeline greatly reduced the time to get values by metrics, but required more allocations

old - old solution without pipeline
new - new solution with pipeline

benchmark                                     old ns/op      new ns/op     delta
BenchmarkGetMetricValues/100-metrics-12       67507442       3536363       -94.76%
BenchmarkGetMetricValues/1000-metrics-12      512515118      26622719      -94.81%
BenchmarkGetMetricValues/5000-metrics-12      2600663168     94167600      -96.38%
BenchmarkGetMetricValues/10000-metrics-12     4881419523     179366564     -96.33%

benchmark                                     old allocs     new allocs     delta
BenchmarkGetMetricValues/100-metrics-12       5212           5126           -1.65%
BenchmarkGetMetricValues/1000-metrics-12      21133          51036          +141.50%
BenchmarkGetMetricValues/5000-metrics-12      158636         155034         -2.27%
BenchmarkGetMetricValues/10000-metrics-12     104532         147356         +40.97%

benchmark                                     old bytes     new bytes     delta
BenchmarkGetMetricValues/100-metrics-12       184949        182788        -1.17%
BenchmarkGetMetricValues/1000-metrics-12      833624        1845147       +121.34%
BenchmarkGetMetricValues/5000-metrics-12      5856144       5865810       +0.17%
BenchmarkGetMetricValues/10000-metrics-12     4961472       6296489       +26.91%

@almostinf almostinf requested a review from a team as a code owner May 23, 2024 10:02
@almostinf almostinf changed the title feat(checker): add fetching metrics values in pipe perf(checker): add fetching metrics values in pipe May 27, 2024
@almostinf
Copy link
Member Author

/build

@almostinf almostinf merged commit 3cda2e5 into master May 30, 2024
7 checks passed
@almostinf almostinf deleted the feat/fetch-metrics-in-pipe branch May 30, 2024 07:58
Copy link

Build and push Docker images with tag: 2024-05-30.3cda2e5

1 similar comment
Copy link

Build and push Docker images with tag: 2024-05-30.3cda2e5

almostinf added a commit that referenced this pull request May 30, 2024
almostinf added a commit that referenced this pull request May 30, 2024
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.

3 participants