优化指标统计性能

This commit is contained in:
刘祥超
2023-08-15 20:12:09 +08:00
parent 6f51fe52f8
commit 40e137e69e
7 changed files with 131 additions and 29 deletions

View File

@@ -17,6 +17,6 @@ type Stat struct {
}
func SumStat(serverId int64, keys []string, time string, version int32, itemId int64) string {
keysData := strings.Join(keys, "$EDGE$")
var keysData = strings.Join(keys, "$EDGE$")
return strconv.FormatUint(fnv.HashString(strconv.FormatInt(serverId, 10)+"@"+keysData+"@"+time+"@"+strconv.Itoa(int(version))+"@"+strconv.FormatInt(itemId, 10)), 10)
}