优化代码

This commit is contained in:
刘祥超
2022-10-14 15:00:05 +08:00
parent 7da9363336
commit 1fec88dfc6
2 changed files with 8 additions and 8 deletions

View File

@@ -83,7 +83,7 @@ func (this *BandwidthStatManager) Loop() error {
Day: stat.Day, Day: stat.Day,
TimeAt: stat.TimeAt, TimeAt: stat.TimeAt,
Bytes: stat.MaxBytes / bandwidthTimestampDelim, Bytes: stat.MaxBytes / bandwidthTimestampDelim,
RegionId: regionId, NodeRegionId: regionId,
}) })
delete(this.m, key) delete(this.m, key)
} }

View File

@@ -174,7 +174,7 @@ func (this *TrafficStatManager) Upload() error {
pbServerStats = append(pbServerStats, &pb.ServerDailyStat{ pbServerStats = append(pbServerStats, &pb.ServerDailyStat{
ServerId: serverId, ServerId: serverId,
RegionId: config.RegionId, NodeRegionId: config.RegionId,
Bytes: item.Bytes, Bytes: item.Bytes,
CachedBytes: item.CachedBytes, CachedBytes: item.CachedBytes,
CountRequests: item.CountRequests, CountRequests: item.CountRequests,