优化代码

This commit is contained in:
刘祥超
2022-03-20 20:58:34 +08:00
parent 130519be71
commit ad59c28200

View File

@@ -997,7 +997,7 @@ func (this *FileStorage) hotLoop() {
this.hotMap = map[string]*HotItem{}
this.hotMapLocker.Unlock()
// 取Top10写入内存
// 取Top10%写入内存
if len(result) > 0 {
sort.Slice(result, func(i, j int) bool {
return result[i].Hits > result[j].Hits