File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed
Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ import (
1111 "sync/atomic"
1212 "time"
1313
14- "github.com/cespare/xxhash/v2"
15-
1614 "github.com/go-graphite/go-carbon/helper"
1715 "github.com/go-graphite/go-carbon/points"
1816 "github.com/go-graphite/go-carbon/tags"
@@ -334,9 +332,9 @@ func (c *Cache) Add(p *points.Points) {
334332 if c .newMetricsChan != nil && c .newMetricCf != nil {
335333 // add metric to new metric channel if missed in bloom
336334 // despite what we have it in cache (new behaviour)
337- if ! c .newMetricCf .Has (xxhash . Sum64 ([] byte ( p .Metric ) )) {
335+ if ! c .newMetricCf .Has (helper . HashString ( p .Metric )) {
338336 sendMetricToNewMetricChan (c , p .Metric )
339- c .newMetricCf .Add (xxhash . Sum64 ([] byte ( p .Metric ) ))
337+ c .newMetricCf .Add (helper . HashString ( p .Metric ))
340338 }
341339
342340 }
Original file line number Diff line number Diff line change @@ -96,5 +96,5 @@ func benchmarkStrategy(b *testing.B, strategy string) {
9696}
9797
9898func BenchmarkUpdateQueueMax (b * testing.B ) { benchmarkStrategy (b , "max" ) }
99- func BenchmarkUpdateQueueSort (b * testing.B ) { benchmarkStrategy (b , "sort " ) }
99+ func BenchmarkUpdateQueueSort (b * testing.B ) { benchmarkStrategy (b , "sorted " ) }
100100func BenchmarkUpdateQueueNoop (b * testing.B ) { benchmarkStrategy (b , "noop" ) }
Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ require (
3636)
3737
3838require (
39- github.com/cespare/xxhash/v2 v2.3.0
4039 github.com/greatroar/blobloom v0.8.1
4140 github.com/zeebo/xxh3 v1.0.2
4241 golang.org/x/net v0.43.0
@@ -51,6 +50,7 @@ require (
5150 cloud.google.com/go/iam v1.5.2 // indirect
5251 cloud.google.com/go/pubsub/v2 v2.0.0 // indirect
5352 github.com/beorn7/perks v1.0.1 // indirect
53+ github.com/cespare/xxhash/v2 v2.3.0 // indirect
5454 github.com/davecgh/go-spew v1.1.1 // indirect
5555 github.com/eapache/go-resiliency v1.7.0 // indirect
5656 github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
You can’t perform that action at this time.
0 commit comments