mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-30 15:50:07 +01:00
20 lines
322 B
Go
20 lines
322 B
Go
package logstorage
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func BenchmarkTokenizeStrings(b *testing.B) {
|
|
a := strings.Split(benchLogs, "\n")
|
|
|
|
b.ReportAllocs()
|
|
b.SetBytes(int64(len(benchLogs)))
|
|
b.RunParallel(func(pb *testing.PB) {
|
|
var tokens []string
|
|
for pb.Next() {
|
|
tokens = tokenizeStrings(tokens[:0], a)
|
|
}
|
|
})
|
|
}
|