Skip to content

Commit

Permalink
Return Sampler as pointer (#1666)
Browse files Browse the repository at this point in the history
Signed-off-by: Jude Wang <judew@uber.com>
  • Loading branch information
guanw authored and yurishkuro committed Jul 17, 2019
1 parent e567725 commit d3ee676
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions storage/spanstore/downsampling_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type downsamplingWriterMetrics struct {
type DownsamplingWriter struct {
spanWriter Writer
metrics downsamplingWriterMetrics
sampler Sampler
sampler *Sampler
}

// DownsamplingOptions contains the options for constructing a DownsamplingWriter.
Expand Down Expand Up @@ -96,7 +96,7 @@ type Sampler struct {
}

// NewSampler creates SamplingExecutor
func NewSampler(ratio float64, hashSalt string) Sampler {
func NewSampler(ratio float64, hashSalt string) *Sampler {
if hashSalt == "" {
hashSalt = defaultHashSalt
}
Expand All @@ -111,7 +111,7 @@ func NewSampler(ratio float64, hashSalt string) Sampler {
}
},
}
return Sampler{
return &Sampler{
threshold: calculateThreshold(ratio),
hasherPool: pool,
lengthOfSalt: len(hashSaltBytes),
Expand Down

0 comments on commit d3ee676

Please sign in to comment.