graphqlbackend: Reduce allocations in zoektIndexedRepos
Created by: tsenart
Original delta
name old time/op new time/op delta
SearchResults-16 6.13ms ±22% 6.04ms ±19% ~ (p=0.912 n=10+10)
_zoektIndexedRepos-16 1.83ms ± 4% 1.30ms ± 2% -29.02% (p=0.000 n=9+9)
name old alloc/op new alloc/op delta
SearchResults-16 2.32MB ± 0% 2.39MB ± 0% +2.84% (p=0.000 n=10+10)
_zoektIndexedRepos-16 2.50MB ± 0% 1.16MB ± 0% -53.82% (p=0.000 n=10+10)
name old allocs/op new allocs/op delta
SearchResults-16 20.7k ± 0% 15.8k ± 0% -23.57% (p=0.000 n=8+10)
_zoektIndexedRepos-16 20.1k ± 0% 0.0k ± 0% -99.96% (p=0.000 n=10+10)
Updated delta
name old time/op new time/op delta
SearchResults-16 5.37ms ±13% 4.79ms ±11% -10.73% (p=0.004 n=10+10)
_zoektIndexedRepos-16 2.41ms ± 3% 0.58ms ± 4% -76.02% (p=0.000 n=10+10)
name old alloc/op new alloc/op delta
SearchResults-16 2.32MB ± 0% 1.97MB ± 0% -14.88% (p=0.000 n=10+10)
_zoektIndexedRepos-16 2.49MB ± 0% 0.17MB ± 1% -93.36% (p=0.000 n=10+10)
name old allocs/op new allocs/op delta
SearchResults-16 20.7k ± 0% 15.6k ± 0% -24.28% (p=0.000 n=8+10)
_zoektIndexedRepos-16 20.1k ± 0% 0.0k ± 0% -99.97% (p=0.000 n=10+10)
Merge request reports
Activity
Created by: codecov[bot]
Codecov Report
Merging #4702 into master will decrease coverage by
<.01%
. The diff coverage is85.29%
.@@ Coverage Diff @@ ## master #4702 +/- ## ========================================== - Coverage 47.79% 47.78% -0.01% ========================================== Files 725 725 Lines 44194 44188 -6 Branches 1758 1758 ========================================== - Hits 21123 21116 -7 Misses 21087 21087 - Partials 1984 1985 +1
Impacted Files Coverage Δ cmd/frontend/internal/pkg/search/repo_revs.go 81.57% <ø> (ø)
cmd/frontend/graphqlbackend/repositories.go 30.65% <20%> (+0.15%)
cmd/frontend/graphqlbackend/textsearch.go 46.34% <96.55%> (-0.43%)
...d/frontend/internal/authz/bitbucketserver/store.go 78.69% <0%> (-1.19%)
Created by: tsenart
And here's the delta for the more recently added
BenchmarkIntegrationSearchResults
.name old time/op new time/op delta IntegrationSearchResults-16 23.5ms ±13% 22.7ms ±11% ~ (p=0.138 n=19+19) name old alloc/op new alloc/op delta IntegrationSearchResults-16 8.11MB ± 0% 7.75MB ± 0% -4.36% (p=0.000 n=18+18) name old allocs/op new allocs/op delta IntegrationSearchResults-16 166k ± 0% 161k ± 0% -3.02% (p=0.000 n=15+16)
Created by: keegancsmith
And here's the delta for the more recently added
BenchmarkIntegrationSearchResults
.Surprisingly small difference. Is it possible you mixed up the base you compared against? Or is it due to not using caching in the benchmark? We should use caching in the benchmark since it doesn't affect coverage. Just make sure you close the client so we shutdown those goroutines.
Please register or sign in to reply