mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 18:53:29 +00:00
metrics: flesh out some of the metric types
This commit is contained in:
committed by
Ron Evans
parent
1976d9e3fe
commit
7c54dbc61f
@@ -2,15 +2,26 @@
|
|||||||
|
|
||||||
package metrics
|
package metrics
|
||||||
|
|
||||||
type Description struct{}
|
type Description struct {
|
||||||
|
Name string
|
||||||
|
Description string
|
||||||
|
Kind ValueKind
|
||||||
|
Cumulative bool
|
||||||
|
}
|
||||||
|
|
||||||
func All() []Description {
|
func All() []Description {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type Float64Histogram struct{}
|
type Float64Histogram struct {
|
||||||
|
Counts []uint64
|
||||||
|
Buckets []float64
|
||||||
|
}
|
||||||
|
|
||||||
type Sample struct{}
|
type Sample struct {
|
||||||
|
Name string
|
||||||
|
Value Value
|
||||||
|
}
|
||||||
|
|
||||||
func Read(m []Sample) {}
|
func Read(m []Sample) {}
|
||||||
|
|
||||||
@@ -23,10 +34,17 @@ func (v Value) Float64Histogram() *Float64Histogram {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (v Value) Kind() ValueKind {
|
func (v Value) Kind() ValueKind {
|
||||||
return ValueKind{}
|
return KindBad
|
||||||
}
|
}
|
||||||
func (v Value) Uint64() uint64 {
|
func (v Value) Uint64() uint64 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
type ValueKind struct{}
|
type ValueKind int
|
||||||
|
|
||||||
|
const (
|
||||||
|
KindBad ValueKind = iota
|
||||||
|
KindUint64
|
||||||
|
KindFloat64
|
||||||
|
KindFloat64Histogram
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user