Add Metrics
This commit is contained in:
parent
4dc448056c
commit
8e97af8dc3
121 changed files with 8364 additions and 3811 deletions
4
vendor/github.com/go-kit/kit/metrics/internal/lv/space.go
generated
vendored
4
vendor/github.com/go-kit/kit/metrics/internal/lv/space.go
generated
vendored
|
@ -79,7 +79,7 @@ type pair struct{ label, value string }
|
|||
func (n *node) observe(lvs LabelValues, value float64) {
|
||||
n.mtx.Lock()
|
||||
defer n.mtx.Unlock()
|
||||
if len(lvs) == 0 {
|
||||
if len(lvs) <= 0 {
|
||||
n.observations = append(n.observations, value)
|
||||
return
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ func (n *node) observe(lvs LabelValues, value float64) {
|
|||
func (n *node) add(lvs LabelValues, delta float64) {
|
||||
n.mtx.Lock()
|
||||
defer n.mtx.Unlock()
|
||||
if len(lvs) == 0 {
|
||||
if len(lvs) <= 0 {
|
||||
var value float64
|
||||
if len(n.observations) > 0 {
|
||||
value = last(n.observations) + delta
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue