feat(sub): add socket-wide stats including dropped messages#88
Conversation
Signed-off-by: 7suyash7 <[email protected]>
mempirate
left a comment
There was a problem hiding this comment.
Thanks for the PR! I've got a small suggestion
| } | ||
|
|
||
| #[derive(Debug, Default)] | ||
| pub struct SocketWideStats { |
There was a problem hiding this comment.
Agreed with having socket-agnostic stats for shared metrics, but I would like to see it implemented differently, something like the following:
struct SocketStats<S> {
// ... socket-wide stats, and
substats: S,
}Where S = a stats struct specific to the socket implementation, for example SubStats or PubStats.
There was a problem hiding this comment.
Hi, @mempirate yeah a unified structure makes sense. Just want to clarify though:
Are you thinking of a struct like maybe SocketStats<SpecificStats> (eg. SocketStats) where specific SpecificStats (like SubStats) hold the implementation specific details like the session map and the new counters like dropped_messages_total for Sub? And for this specific PR should I only refactor the SubSocket stats into this new pattern, leaving the refactor of Pub/Rep/Req stats for future work ? I'm happy to do a big refactor if thats preferred!
There was a problem hiding this comment.
Yeah that's right! And would be great if you'd want to do this across the different socket types so we don't get any inconsistencies
Signed-off-by: 7suyash7 <[email protected]>
Signed-off-by: 7suyash7 <[email protected]>
Signed-off-by: 7suyash7 <[email protected]>
Signed-off-by: 7suyash7 <[email protected]>
Signed-off-by: 7suyash7 <[email protected]>
Signed-off-by: 7suyash7 <[email protected]>
|
Hi! @mempirate, can you please take a look |
mempirate
left a comment
There was a problem hiding this comment.
LGTM! Thanks for the contribution :)
Implement statistics tracking for the SubSocket, #37
Add a new
SocketWideStatsstruct to hold metrics related tothe overall socket operation, distinct from per-publisher stats. Includes counters for: