Add debug => go-debug

This commit is contained in:
Asim Aslam
2019-05-31 01:22:19 +01:00
parent 95d134b57e
commit f2139e2a16
13 changed files with 1023 additions and 0 deletions

24
debug/stats/stats.go Normal file
View File

@@ -0,0 +1,24 @@
// Package stats provides process statistics
package stats
// Stats provides metrics recording and retrieval
type Stats interface {
Read(...ReadOption) []*Metrics
Record(*Metrics) error
String() string
}
type Metrics struct {
// Unique id of metric
Id string
// Metadata
Metadata map[string]string
// Floating values
Values map[string]float64
// Counters
Counters map[string]int64
}
type ReadOptions struct{}
type ReadOption func(o *ReadOptions)