mirror of
https://github.com/sot-tech/mochi.git
synced 2026-05-14 02:08:36 -07:00
Go routine stat
This commit is contained in:
@@ -73,6 +73,8 @@ type Stats struct {
|
||||
ConnectionsAccepted uint64 `json:"Connections.Accepted"`
|
||||
BytesTransmitted uint64 `json:"BytesTransmitted"`
|
||||
|
||||
GoRoutines int `json:"Runtime.GoRoutines"`
|
||||
|
||||
RequestsHandled uint64 `json:"Requests.Handled"`
|
||||
RequestsErrored uint64 `json:"Requests.Errored"`
|
||||
ClientErrors uint64 `json:"Requests.Bad"`
|
||||
@@ -105,6 +107,8 @@ func New(cfg config.StatsConfig) *Stats {
|
||||
Started: time.Now(),
|
||||
events: make(chan int, cfg.BufferSize),
|
||||
|
||||
GoRoutines: 0,
|
||||
|
||||
ipv4PeerEvents: make(chan int, cfg.BufferSize),
|
||||
ipv6PeerEvents: make(chan int, cfg.BufferSize),
|
||||
responseTimeEvents: make(chan time.Duration, cfg.BufferSize),
|
||||
|
||||
Reference in New Issue
Block a user