@@ -74,6 +74,7 @@ class TNodeWhiteboardService : public TActorBootstrapped<TNodeWhiteboardService>
74
74
i64 MaxClockSkewWithPeerUs;
75
75
ui32 MaxClockSkewPeerId;
76
76
float MaxNetworkUtilization = 0.0 ;
77
+ ui64 SumNetworkWriteThroughput = 0 ;
77
78
NKikimrWhiteboard::TSystemStateInfo SystemStateInfo;
78
79
THolder<NTracing::ITraceCollection> TabletIntrospectionData;
79
80
@@ -568,6 +569,7 @@ class TNodeWhiteboardService : public TActorBootstrapped<TNodeWhiteboardService>
568
569
}
569
570
// TODO: need better way to calculate network utilization
570
571
MaxNetworkUtilization = std::max (MaxNetworkUtilization, ev->Get ()->Record .GetUtilization ());
572
+ SumNetworkWriteThroughput += nodeStateInfo.GetWriteThroughput ();
571
573
nodeStateInfo.MergeFrom (ev->Get ()->Record );
572
574
nodeStateInfo.SetChangeTime (currentChangeTime);
573
575
}
@@ -1095,6 +1097,7 @@ class TNodeWhiteboardService : public TActorBootstrapped<TNodeWhiteboardService>
1095
1097
}
1096
1098
1097
1099
void Handle (TEvPrivate::TEvUpdateRuntimeStats::TPtr &, const TActorContext &ctx) {
1100
+ static constexpr TDuration UPDATE_PERIOD = TDuration::Seconds (15 );
1098
1101
{
1099
1102
NKikimrWhiteboard::TSystemStateInfo systemStatsUpdate;
1100
1103
TVector<double > loadAverage = GetLoadAverage ();
@@ -1120,8 +1123,13 @@ class TNodeWhiteboardService : public TActorBootstrapped<TNodeWhiteboardService>
1120
1123
MaxNetworkUtilization = 0 ;
1121
1124
}
1122
1125
1126
+ {
1127
+ SystemStateInfo.SetNetworkWriteThroughput (SumNetworkWriteThroughput / UPDATE_PERIOD.Seconds ());
1128
+ SumNetworkWriteThroughput = 0 ;
1129
+ }
1130
+
1123
1131
UpdateSystemState (ctx);
1124
- ctx.Schedule (TDuration::Seconds ( 15 ) , new TEvPrivate::TEvUpdateRuntimeStats ());
1132
+ ctx.Schedule (UPDATE_PERIOD , new TEvPrivate::TEvUpdateRuntimeStats ());
1125
1133
}
1126
1134
1127
1135
void Handle (TEvPrivate::TEvCleanupDeadTablets::TPtr &, const TActorContext &ctx) {
0 commit comments