Skip to content
This repository was archived by the owner on Aug 13, 2019. It is now read-only.

Reuse string buffer in stringTuples.Swap#654

Merged
codesome merged 5 commits intoprometheus-junkyard:masterfrom
codesome:string-tuples
Jul 10, 2019
Merged

Reuse string buffer in stringTuples.Swap#654
codesome merged 5 commits intoprometheus-junkyard:masterfrom
codesome:string-tuples

Conversation

@codesome
Copy link
Copy Markdown
Contributor

@codesome codesome commented Jul 5, 2019

This is a broken down piece of #627

[Don't merge until Prometheus 2.11 is out]

Ganesh Vernekar added 2 commits July 3, 2019 14:58
This reduces the allocs of WriteLabelIndex significantly.

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
@codesome
Copy link
Copy Markdown
Contributor Author

codesome commented Jul 5, 2019

Here are the benchmark results

benchmark                                                                                 old ns/op       new ns/op       delta
BenchmarkCompaction/type=normal,blocks=2,series=1000000,samplesPerSeriesPerBlock=51-8     12925384892     12786361556     -1.08%

benchmark                                                                                 old allocs     new allocs     delta
BenchmarkCompaction/type=normal,blocks=2,series=1000000,samplesPerSeriesPerBlock=51-8     15836497       10150083       -35.91%

benchmark                                                                                 old bytes      new bytes      delta
BenchmarkCompaction/type=normal,blocks=2,series=1000000,samplesPerSeriesPerBlock=51-8     2080160880     1988797488     -4.39%

Comment thread index/index.go Outdated
Ganesh Vernekar added 2 commits July 9, 2019 13:22
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
Copy link
Copy Markdown
Contributor

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks. I guess the improvement is because we sort a lot (:

Copy link
Copy Markdown
Contributor

@csmarchbanks csmarchbanks left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for making it lazy!

@codesome codesome merged commit b5b8c92 into prometheus-junkyard:master Jul 10, 2019
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.

3 participants