Files
EdgeNode/internal/metrics/sum_test.go

22 lines
466 B
Go
Raw Permalink Normal View History

2024-07-27 15:42:50 +08:00
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cloud .
2023-08-15 20:12:09 +08:00
package metrics_test
import (
"runtime"
"testing"
2024-07-27 15:42:50 +08:00
"github.com/TeaOSLab/EdgeNode/internal/metrics"
timeutil "github.com/iwind/TeaGo/utils/time"
2023-08-15 20:12:09 +08:00
)
func BenchmarkSumStat(b *testing.B) {
runtime.GOMAXPROCS(2)
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
2024-04-02 19:54:04 +08:00
metrics.UniqueKey(1, []string{"1.2.3.4"}, timeutil.Format("Ymd"), 1, 1)
2023-08-15 20:12:09 +08:00
}
})
}