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 (s *JSONStats) DecRX(t ptp.MessageType)
- func (s *JSONStats) DecRXSignaling(t ptp.MessageType)
- func (s *JSONStats) DecSubscription(t ptp.MessageType)
- func (s *JSONStats) DecTX(t ptp.MessageType)
- func (s *JSONStats) DecTXSignaling(t ptp.MessageType)
- func (s *JSONStats) DecWorkerSubs(workerid int)
- func (s *JSONStats) IncRX(t ptp.MessageType)
- func (s *JSONStats) IncRXSignaling(t ptp.MessageType)
- func (s *JSONStats) IncSubscription(t ptp.MessageType)
- func (s *JSONStats) IncTX(t ptp.MessageType)
- func (s *JSONStats) IncTXSignaling(t ptp.MessageType)
- func (s *JSONStats) IncWorkerSubs(workerid int)
- func (s *JSONStats) Reset()
- func (s *JSONStats) SetMaxTXTSAttempts(workerid int, attempts int64)
- func (s *JSONStats) SetMaxWorkerQueue(workerid int, queue int64)
- func (s *JSONStats) SetUTCOffset(utcoffset int64)
- func (s *JSONStats) Snapshot()
- func (s *JSONStats) Start(monitoringport int)
- type Stats
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 is what we want to report as stats via http
func (*JSONStats) DecRX ¶
func (s *JSONStats) DecRX(t ptp.MessageType)
DecRX atomically removes 1 from the counter
func (*JSONStats) DecRXSignaling ¶
func (s *JSONStats) DecRXSignaling(t ptp.MessageType)
DecRXSignaling atomically removes 1 from the counter
func (*JSONStats) DecSubscription ¶
func (s *JSONStats) DecSubscription(t ptp.MessageType)
DecSubscription atomically removes 1 from the counter
func (*JSONStats) DecTX ¶
func (s *JSONStats) DecTX(t ptp.MessageType)
DecTX atomically removes 1 from the counter
func (*JSONStats) DecTXSignaling ¶
func (s *JSONStats) DecTXSignaling(t ptp.MessageType)
DecTXSignaling atomically removes 1 from the counter
func (*JSONStats) DecWorkerSubs ¶
DecWorkerSubs atomically removes 1 from the counter
func (*JSONStats) IncRX ¶
func (s *JSONStats) IncRX(t ptp.MessageType)
IncRX atomically add 1 to the counter
func (*JSONStats) IncRXSignaling ¶
func (s *JSONStats) IncRXSignaling(t ptp.MessageType)
IncRXSignaling atomically add 1 to the counter
func (*JSONStats) IncSubscription ¶
func (s *JSONStats) IncSubscription(t ptp.MessageType)
IncSubscription atomically add 1 to the counter
func (*JSONStats) IncTX ¶
func (s *JSONStats) IncTX(t ptp.MessageType)
IncTX atomically add 1 to the counter
func (*JSONStats) IncTXSignaling ¶
func (s *JSONStats) IncTXSignaling(t ptp.MessageType)
IncTXSignaling atomically add 1 to the counter
func (*JSONStats) IncWorkerSubs ¶
IncWorkerSubs atomically add 1 to the counter
func (*JSONStats) SetMaxTXTSAttempts ¶
SetMaxTXTSAttempts atomically sets number of retries for get latest TX timestamp
func (*JSONStats) SetMaxWorkerQueue ¶
SetMaxWorkerQueue atomically sets worker queue len
func (*JSONStats) SetUTCOffset ¶
SetUTCOffset atomically sets the utcoffset
type Stats ¶
type Stats interface { // Start starts a stat reporter // Use this for passive reporters Start(monitoringport int) // Snapshot the values so they can be reported atomically Snapshot() // Reset atomically sets all the counters to 0 Reset() // IncSubscription atomically add 1 to the counter IncSubscription(t ptp.MessageType) // IncRX atomically add 1 to the counter IncRX(t ptp.MessageType) // IncTX atomically add 1 to the counter IncTX(t ptp.MessageType) // IncRXSignaling atomically add 1 to the counter IncRXSignaling(t ptp.MessageType) // IncTXSignaling atomically add 1 to the counter IncTXSignaling(t ptp.MessageType) // IncWorkerSubs atomically add 1 to the counter IncWorkerSubs(workerid int) // DecSubscription atomically removes 1 from the counter DecSubscription(t ptp.MessageType) // DecRX atomically removes 1 from the counter DecRX(t ptp.MessageType) // DecTX atomically removes 1 from the counter DecTX(t ptp.MessageType) // DecRXSignaling atomically removes 1 from the counter DecRXSignaling(t ptp.MessageType) // DecTXSignaling atomically removes 1 from the counter DecTXSignaling(t ptp.MessageType) // DecWorkerSubs atomically removes 1 from the counter DecWorkerSubs(workerid int) // SetMaxWorkerQueue atomically sets worker queue len SetMaxWorkerQueue(workerid int, queue int64) // SetMaxTXTSAttempts atomically sets number of retries for get latest TX timestamp SetMaxTXTSAttempts(workerid int, retries int64) // SetUTCOffset atomically sets the utcoffset SetUTCOffset(utcoffset int64) }
Stats is a metric collection interface