Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrWriteFailed = errors.New("submit failed")
ErrWriteFailed is an error that indicates failed to submit a StatReport.
Functions ¶
Types ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
A Metrics is used to log and report stat reports.
type RemoteWriter ¶
type RemoteWriter struct {
// contains filtered or unexported fields
}
A RemoteWriter is a writer to write StatReport.
func (*RemoteWriter) Write ¶
func (rw *RemoteWriter) Write(report *StatReport) error
type StatReport ¶
type StatReport struct { Name string `json:"name"` Timestamp int64 `json:"tm"` Pid int `json:"pid"` ReqsPerSecond float32 `json:"qps"` Drops int `json:"drops"` Average float32 `json:"avg"` Median float32 `json:"med"` Top90th float32 `json:"t90"` Top99th float32 `json:"t99"` Top99p9th float32 `json:"t99p9"` }
A StatReport is a stat report entry.
type Writer ¶
type Writer interface {
Write(report *StatReport) error
}
Writer interface wraps the Write method.
func NewRemoteWriter ¶
NewRemoteWriter returns a RemoteWriter.
Click to show internal directories.
Click to hide internal directories.