[ADDED] Number subscriptions in account STATZ

This commit is contained in:
Piotr Piotrowski
2023-02-16 13:56:37 +01:00
parent 5eb7d9b99f
commit 6ed82376a6
2 changed files with 4 additions and 2 deletions

View File

@@ -154,6 +154,7 @@ type AccountStat struct {
Conns int `json:"conns"`
LeafNodes int `json:"leafnodes"`
TotalConns int `json:"total_conns"`
NumSubs uint32 `json:"num_subscriptions"`
Sent DataStats `json:"sent"`
Received DataStats `json:"received"`
SlowConsumers int64 `json:"slow_consumers"`
@@ -1907,6 +1908,7 @@ func (a *Account) statz() *AccountStat {
Conns: localConns,
LeafNodes: leafConns,
TotalConns: localConns + leafConns,
NumSubs: a.sl.Count(),
Received: DataStats{
Msgs: atomic.LoadInt64(&a.inMsgs),
Bytes: atomic.LoadInt64(&a.inBytes)},