mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-05-17 00:26:36 +03:00
21 lines
419 B
Go
21 lines
419 B
Go
package promutil
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func BenchmarkLabelsInternStrings(b *testing.B) {
|
|
b.ReportAllocs()
|
|
b.SetBytes(1)
|
|
b.RunParallel(func(pb *testing.PB) {
|
|
labels := NewLabelsFromMap(map[string]string{
|
|
"job": "node-exporter",
|
|
"instance": "foo.bar.baz:1234",
|
|
"__meta_kubernetes_namespace": "default",
|
|
})
|
|
for pb.Next() {
|
|
labels.InternStrings()
|
|
}
|
|
})
|
|
}
|