From 1fec88dfc695462dce2bc9deef47aff75667f060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Fri, 14 Oct 2022 15:00:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/stats/bandwidth_stat_manager.go | 14 +++++++------- internal/stats/traffic_stat_manager.go | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/stats/bandwidth_stat_manager.go b/internal/stats/bandwidth_stat_manager.go index 86666b4..ce9a3cd 100644 --- a/internal/stats/bandwidth_stat_manager.go +++ b/internal/stats/bandwidth_stat_manager.go @@ -77,13 +77,13 @@ func (this *BandwidthStatManager) Loop() error { for key, stat := range this.m { if stat.Day < day || stat.TimeAt < currentTime { pbStats = append(pbStats, &pb.ServerBandwidthStat{ - Id: 0, - UserId: stat.UserId, - ServerId: stat.ServerId, - Day: stat.Day, - TimeAt: stat.TimeAt, - Bytes: stat.MaxBytes / bandwidthTimestampDelim, - RegionId: regionId, + Id: 0, + UserId: stat.UserId, + ServerId: stat.ServerId, + Day: stat.Day, + TimeAt: stat.TimeAt, + Bytes: stat.MaxBytes / bandwidthTimestampDelim, + NodeRegionId: regionId, }) delete(this.m, key) } diff --git a/internal/stats/traffic_stat_manager.go b/internal/stats/traffic_stat_manager.go index 4f066ea..3fca488 100644 --- a/internal/stats/traffic_stat_manager.go +++ b/internal/stats/traffic_stat_manager.go @@ -174,7 +174,7 @@ func (this *TrafficStatManager) Upload() error { pbServerStats = append(pbServerStats, &pb.ServerDailyStat{ ServerId: serverId, - RegionId: config.RegionId, + NodeRegionId: config.RegionId, Bytes: item.Bytes, CachedBytes: item.CachedBytes, CountRequests: item.CountRequests,