上传带宽信息时同时缓存流量、统计流量、请求数等参数,为将来的流量和带宽合并做准备

This commit is contained in:
GoEdgeLab
2023-03-22 18:00:35 +08:00
parent d849ff45e2
commit 2256cc373b
4 changed files with 57 additions and 15 deletions

View File

@@ -111,6 +111,9 @@ func (this *TrafficStatManager) Add(serverId int64, domain string, bytes int64,
return
}
// 添加到带宽
SharedBandwidthStatManager.AddTraffic(serverId, cachedBytes, countRequests, countCachedRequests, countAttacks, attackBytes)
if bytes == 0 && countRequests == 0 {
return
}