Skip to content

Commit

Permalink
feat: handle total bandwidth for protocol stats
Browse files Browse the repository at this point in the history
  • Loading branch information
adklempner committed Oct 22, 2024
1 parent 9061a40 commit 3f8c10f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/metrics/protocolstats.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ func (r *ProtocolStats) Put(db *sql.DB) error {
return err
}

err = r.insertRate(db, "total", r.Total)
if err != nil {
return err
}

return nil
}

Expand Down
1 change: 1 addition & 0 deletions pkg/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ type ProtocolStats struct {
FilterPush Metric `json:"filter-push"`
FilterSubscribe Metric `json:"filter-subscribe"`
Lightpush Metric `json:"lightpush"`
Total Metric `json:"total"`
}

type ReceivedMessage struct {
Expand Down

0 comments on commit 3f8c10f

Please sign in to comment.