Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e393c3af3f
commit
4978089aab
4963 changed files with 677545 additions and 0 deletions
37
metric/series_grouper_test.go
Normal file
37
metric/series_grouper_test.go
Normal file
|
@ -0,0 +1,37 @@
|
|||
package metric
|
||||
|
||||
import (
|
||||
"hash/maphash"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
var m = New(
|
||||
"mymetric",
|
||||
map[string]string{
|
||||
"host": "host.example.com",
|
||||
"mykey": "myvalue",
|
||||
"another key": "another value",
|
||||
},
|
||||
map[string]interface{}{
|
||||
"f1": 1,
|
||||
"f2": 2,
|
||||
"f3": 3,
|
||||
"f4": 4,
|
||||
"f5": 5,
|
||||
"f6": 6,
|
||||
"f7": 7,
|
||||
"f8": 8,
|
||||
},
|
||||
time.Now(),
|
||||
)
|
||||
|
||||
var result uint64
|
||||
|
||||
var hashSeed = maphash.MakeSeed()
|
||||
|
||||
func BenchmarkGroupID(b *testing.B) {
|
||||
for n := 0; n < b.N; n++ {
|
||||
result = groupID(hashSeed, m.Name(), m.TagList(), m.Time())
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue