Reorder stats output

This commit is contained in:
Justin Li 2014-07-24 19:36:57 -04:00
parent ab43e6bd97
commit 47c7faf837

View file

@ -66,16 +66,6 @@ type PercentileTimes struct {
type Stats struct { type Stats struct {
Started time.Time // Time at which Chihaya was booted. Started time.Time // Time at which Chihaya was booted.
Announces uint64 `json:"Tracker.Announces"` // Total number of announces.
Scrapes uint64 `json:"Tracker.Scrapes"` // Total number of scrapes.
IPv4Peers PeerStats `json:"Peers.IPv4"`
IPv6Peers PeerStats `json:"Peers.IPv6"`
TorrentsAdded uint64 `json:"Torrents.Added"`
TorrentsRemoved uint64 `json:"Torrents.Removed"`
TorrentsReaped uint64 `json:"Torrents.Reaped"`
OpenConnections uint64 `json:"Connections.Open"` OpenConnections uint64 `json:"Connections.Open"`
ConnectionsAccepted uint64 `json:"Connections.Accepted"` ConnectionsAccepted uint64 `json:"Connections.Accepted"`
BytesTransmitted uint64 `json:"BytesTransmitted"` BytesTransmitted uint64 `json:"BytesTransmitted"`
@ -83,9 +73,19 @@ type Stats struct {
RequestsHandled uint64 `json:"Requests.Handled"` RequestsHandled uint64 `json:"Requests.Handled"`
RequestsErrored uint64 `json:"Requests.Errored"` RequestsErrored uint64 `json:"Requests.Errored"`
ClientErrors uint64 `json:"Requests.Bad"` ClientErrors uint64 `json:"Requests.Bad"`
ResponseTime PercentileTimes
ResponseTime PercentileTimes Announces uint64 `json:"Tracker.Announces"`
MemStats *MemStatsWrapper `json:"Memory,omitempty"` Scrapes uint64 `json:"Tracker.Scrapes"`
TorrentsAdded uint64 `json:"Torrents.Added"`
TorrentsRemoved uint64 `json:"Torrents.Removed"`
TorrentsReaped uint64 `json:"Torrents.Reaped"`
IPv4Peers PeerStats `json:"Peers.IPv4"`
IPv6Peers PeerStats `json:"Peers.IPv6"`
MemStats *MemStatsWrapper `json:"Memory,omitempty"`
events chan int events chan int
ipv4PeerEvents chan int ipv4PeerEvents chan int