Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MethodStats ¶
type MethodStats struct {
// contains filtered or unexported fields
}
func (*MethodStats) Snapshot ¶
func (ms *MethodStats) Snapshot(window time.Duration) MethodStatsSnapshot
type MethodStatsSnapshot ¶
type MethodStatsSnapshot struct {
TotalCount int64 `json:"total_count"`
ErrorCount int64 `json:"error_count"`
ErrorRate float64 `json:"error_rate"`
AvgDurationMs float64 `json:"avg_duration_ms"`
MinDurationMs float64 `json:"min_duration_ms"`
MaxDurationMs float64 `json:"max_duration_ms"`
P50DurationMs float64 `json:"p50_duration_ms"`
P95DurationMs float64 `json:"p95_duration_ms"`
P99DurationMs float64 `json:"p99_duration_ms"`
RequestsPerMinute float64 `json:"requests_per_minute"`
}
type MethodStatsSnapshotEntry ¶
type MethodStatsSnapshotEntry struct {
Name string `json:"name"`
MethodStatsSnapshot
}
type StoreStats ¶
type StoreStats struct {
// contains filtered or unexported fields
}
func (*StoreStats) Record ¶
func (ss *StoreStats) Record(method string, duration time.Duration, isError bool)
func (*StoreStats) Snapshot ¶
func (ss *StoreStats) Snapshot(window time.Duration) map[string]MethodStatsSnapshot
type StoreStatsSnapshot ¶
type StoreStatsSnapshot struct {
Name store.StoreName `json:"name"`
Methods []MethodStatsSnapshotEntry `json:"methods"`
}
func GetSnapshot ¶
func GetSnapshot(window time.Duration) []StoreStatsSnapshot
Click to show internal directories.
Click to hide internal directories.