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

Reuse slice for the range vector allocations. #2219

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

cyriltovena
Copy link
Contributor

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

❯ benchcmp old.txt new.txt
benchmark                         old ns/op      new ns/op      delta
BenchmarkRangeQuery100000-16      3356959        3097925        -7.72%
BenchmarkRangeQuery200000-16      15821777       14543104       -8.08%
BenchmarkRangeQuery500000-16      2107956639     1992137391     -5.49%
BenchmarkRangeQuery1000000-16     4051613799     4041557363     -0.25%

benchmark                         old allocs     new allocs     delta
BenchmarkRangeQuery100000-16      5241           5235           -0.11%
BenchmarkRangeQuery200000-16      5993           5835           -2.64%
BenchmarkRangeQuery500000-16      138631         130304         -6.01%
BenchmarkRangeQuery1000000-16     272021         255363         -6.12%

benchmark                         old bytes     new bytes     delta
BenchmarkRangeQuery100000-16      716984        714652        -0.33%
BenchmarkRangeQuery200000-16      1464403       1338725       -8.58%
BenchmarkRangeQuery500000-16      135321968     132657776     -1.97%
BenchmarkRangeQuery1000000-16     270999096     265668520     -1.97%

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

Codecov Report

Merging #2219 into master will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2219      +/-   ##
==========================================
+ Coverage   62.10%   62.18%   +0.07%     
==========================================
  Files         154      154              
  Lines       12457    12459       +2     
==========================================
+ Hits         7737     7748      +11     
+ Misses       4111     4106       -5     
+ Partials      609      605       -4     
Impacted Files Coverage Δ
pkg/logql/range_vector.go 97.70% <100.00%> (+0.05%) ⬆️
pkg/logql/evaluator.go 92.72% <0.00%> (+0.41%) ⬆️
pkg/promtail/targets/filetarget.go 70.48% <0.00%> (+1.80%) ⬆️
pkg/promtail/targets/tailer.go 78.40% <0.00%> (+4.54%) ⬆️

@owen-d owen-d merged commit 91158ab into grafana:master Jun 19, 2020
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.

3 participants