Versions in this module Expand all Collapse all v1 v1.51.8 Jul 13, 2021 v1.51.7 Apr 26, 2021 Changes in this version + var ErrWriteFailed = errors.New("submit failed") + func CpuUsage() int64 + func DisableLog() + func Report(msg string) — linux/amd64 + func Report(string) — darwin/amd64, js/wasm, windows/amd64 + func SetReportWriter(writer Writer) + func SetReporter(fn func(string)) — linux/amd64 + func SetReporter(func(string)) — darwin/amd64, js/wasm, windows/amd64 + type Metrics struct + func NewMetrics(name string) *Metrics + func (m *Metrics) Add(task Task) + func (m *Metrics) AddDrop() + func (m *Metrics) SetName(name string) + type RemoteWriter struct + func (rw *RemoteWriter) Write(report *StatReport) error + type StatReport struct + Average float32 + Drops int + Median float32 + Name string + Pid int + ReqsPerSecond float32 + Timestamp int64 + Top90th float32 + Top99p9th float32 + Top99th float32 + type Task struct + Description string + Drop bool + Duration time.Duration + type Writer interface + Write func(report *StatReport) error + func NewRemoteWriter(endpoint string) Writer