Remove shadowing of built-ins (#2290)
This commit is contained in:
@ -114,14 +114,14 @@ var (
|
||||
)
|
||||
|
||||
func unaryBenchmark(startTimer func(), stopTimer func(int32), benchFeatures stats.Features, benchtime time.Duration, s *stats.Stats) {
|
||||
caller, close := makeFuncUnary(benchFeatures)
|
||||
defer close()
|
||||
caller, cleanup := makeFuncUnary(benchFeatures)
|
||||
defer cleanup()
|
||||
runBenchmark(caller, startTimer, stopTimer, benchFeatures, benchtime, s)
|
||||
}
|
||||
|
||||
func streamBenchmark(startTimer func(), stopTimer func(int32), benchFeatures stats.Features, benchtime time.Duration, s *stats.Stats) {
|
||||
caller, close := makeFuncStream(benchFeatures)
|
||||
defer close()
|
||||
caller, cleanup := makeFuncStream(benchFeatures)
|
||||
defer cleanup()
|
||||
runBenchmark(caller, startTimer, stopTimer, benchFeatures, benchtime, s)
|
||||
}
|
||||
|
||||
|
@ -51,12 +51,12 @@ func (h *lockingHistogram) add(value int64) {
|
||||
h.histogram.Add(value)
|
||||
}
|
||||
|
||||
// swap sets h.histogram to new, and returns its old value.
|
||||
func (h *lockingHistogram) swap(new *stats.Histogram) *stats.Histogram {
|
||||
// swap sets h.histogram to o and returns its old value.
|
||||
func (h *lockingHistogram) swap(o *stats.Histogram) *stats.Histogram {
|
||||
h.mu.Lock()
|
||||
defer h.mu.Unlock()
|
||||
old := h.histogram
|
||||
h.histogram = new
|
||||
h.histogram = o
|
||||
return old
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user