实现新的计数器算法(将时间分片, 统计更加精准)

This commit is contained in:
GoEdgeLab
2023-07-13 15:37:08 +08:00
parent 0a9e2a84c5
commit 428cf08e5b
13 changed files with 501 additions and 46 deletions

View File

@@ -0,0 +1,12 @@
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package counters
type Span struct {
Timestamp int64
Count uint64
}
func NewSpan() *Span {
return &Span{}
}