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

store: Optimized labels conversion on store.Series; Added unsafe labels conversion. #2230

Merged
merged 1 commit into from
Mar 16, 2020

Commits on Mar 10, 2020

  1. store: Optimized labels conversion on store.Series; Added unsafe labe…

    …ls conversion.
    
    ## Changes
    
    * method TranslateLables CPU Optimized (streamed sorting).
    * All store GW label conversation to []storepb.Label are now alloc-less.
    
    ```
    go test -bench=BenchmarkUnsafeVSSafeLabelsConversion -run=^$ -benchmem -timeout 2h -benchtime 10s ./pkg/store/storepb/...
     goos: linux
     goarch: amd64
     pkg: github.com/thanos-io/thanos/pkg/store/storepb
     BenchmarkUnsafeVSSafeLabelsConversion/safe-12         	   34822	    339076 ns/op	  655368 B/op	       2 allocs/op
     BenchmarkUnsafeVSSafeLabelsConversion/unsafe-12       	1000000000	         2.32 ns/op	       0 B/op	       0 allocs/op
    PASS
    ```
    
    TODO: Do the same on Querier.
    
    Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
    bwplotka committed Mar 10, 2020
    Configuration menu
    Copy the full SHA
    8fad74c View commit details
    Browse the repository at this point in the history