File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -149,3 +149,16 @@ double Endpoint::GetBytesReceivedPerSecond() const
149
149
{
150
150
return m_BytesReceived.CalculateRate (Utility::GetTime (), 60 );
151
151
}
152
+
153
+ Dictionary::Ptr Endpoint::GetMessagesReceivedPerType () const
154
+ {
155
+ DictionaryData result;
156
+
157
+ for (auto & [afunc, cnt] : m_MessageCounters) {
158
+ if (auto v (cnt.load (std::memory_order_relaxed)); v) {
159
+ result.emplace_back (afunc->GetName (), v);
160
+ }
161
+ }
162
+
163
+ return new Dictionary (std::move (result));
164
+ }
Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ class Endpoint final : public ObjectImpl<Endpoint>
56
56
double GetBytesSentPerSecond () const override ;
57
57
double GetBytesReceivedPerSecond () const override ;
58
58
59
+ Dictionary::Ptr GetMessagesReceivedPerType () const override ;
60
+
59
61
protected:
60
62
void OnAllConfigLoaded () override ;
61
63
Original file line number Diff line number Diff line change @@ -54,6 +54,10 @@ class Endpoint : ConfigObject
54
54
[no_user_modify, no_storage] double bytes_received_per_second {
55
55
get;
56
56
};
57
+
58
+ [no_user_modify, no_storage] Dictionary::Ptr messages_received_per_type {
59
+ get;
60
+ };
57
61
};
58
62
59
63
}
You can’t perform that action at this time.
0 commit comments