Documentation
¶
Overview ¶
Package stats implements statistics collection and reporting. It is used by server to report internal statistics, such as number of requests and responses.
Index ¶
- type JSONStats
- func (j *JSONStats) DecListeners()
- func (j *JSONStats) DecWorkers()
- func (j *JSONStats) IncInvalidFormat()
- func (j *JSONStats) IncListeners()
- func (j *JSONStats) IncReadError()
- func (j *JSONStats) IncRequests()
- func (j *JSONStats) IncResponses()
- func (j *JSONStats) IncWorkers()
- func (j *JSONStats) ResetAnnounce()
- func (j *JSONStats) SetAnnounce()
- func (j *JSONStats) Start(port int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONStats ¶
type JSONStats struct {
// contains filtered or unexported fields
}
JSONStats implements Stat interface This implementation reports JSON metrics via http interface This is a passive implementation. Only "Start" needs to be called
func (*JSONStats) DecListeners ¶
func (j *JSONStats) DecListeners()
DecListeners atomically removes 1 from the counter
func (*JSONStats) DecWorkers ¶
func (j *JSONStats) DecWorkers()
DecWorkers atomically removes 1 from the counter
func (*JSONStats) IncInvalidFormat ¶
func (j *JSONStats) IncInvalidFormat()
IncInvalidFormat atomically add 1 to the counter
func (*JSONStats) IncListeners ¶
func (j *JSONStats) IncListeners()
IncListeners atomically add 1 to the counter
func (*JSONStats) IncReadError ¶
func (j *JSONStats) IncReadError()
IncReadError atomically add 1 to the counter
func (*JSONStats) IncRequests ¶
func (j *JSONStats) IncRequests()
IncRequests atomically add 1 to the counter
func (*JSONStats) IncResponses ¶
func (j *JSONStats) IncResponses()
IncResponses atomically add 1 to the counter
func (*JSONStats) IncWorkers ¶
func (j *JSONStats) IncWorkers()
IncWorkers atomically add 1 to the counter
func (*JSONStats) ResetAnnounce ¶
func (j *JSONStats) ResetAnnounce()
ResetAnnounce atomically sets counter to 0
func (*JSONStats) SetAnnounce ¶
func (j *JSONStats) SetAnnounce()
SetAnnounce atomically sets counter to 1