Documentation ¶
Overview ¶
Package httpstat implements the statistics tool for HTTP traffic.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPStat ¶
type HTTPStat struct {
// contains filtered or unexported fields
}
HTTPStat is the statistics tool for HTTP traffic.
func (*HTTPStat) Status ¶
Status returns HTTPStat Status, It assumes it is called every five seconds. https://github.com/rcrowley/go-metrics/blob/3113b8401b8a98917cde58f8bbd42a1b1c03b1fd/ewma.go#L98-L99
type RequestMetric ¶
type RequestMetric struct { Count uint64 `json:"count"` M1 float64 `json:"m1"` M5 float64 `json:"m5"` M15 float64 `json:"m15"` ErrCount uint64 `json:"errCount"` M1Err float64 `json:"m1Err"` M5Err float64 `json:"m5Err"` M15Err float64 `json:"m15Err"` M1ErrPercent float64 `json:"m1ErrPercent"` M5ErrPercent float64 `json:"m5ErrPercent"` M15ErrPercent float64 `json:"m15ErrPercent"` Min uint64 `json:"min"` Max uint64 `json:"max"` Mean uint64 `json:"mean"` P25 float64 `json:"p25"` P50 float64 `json:"p50"` P75 float64 `json:"p75"` P95 float64 `json:"p95"` P98 float64 `json:"p98"` P99 float64 `json:"p99"` P999 float64 `json:"p999"` ReqSize uint64 `json:"reqSize"` RespSize uint64 `json:"respSize"` }
RequestMetric contains request metrics.
type Status ¶
type Status struct { RequestMetric Codes map[int]uint64 `json:"codes"` }
Status contains all status generated by HTTPStat.
type StatusCodeMetric ¶
StatusCodeMetric is the metrics of http status code.
Click to show internal directories.
Click to hide internal directories.