mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Fix observe for calculateStateDurations
This commit is contained in:
parent
eb2a8e4c0b
commit
0ad6e37846
1 changed files with 1 additions and 2 deletions
|
@ -501,9 +501,8 @@ func (c *calculateStateMetrics) stop(stateNID types.StateSnapshotNID, err error)
|
||||||
} else {
|
} else {
|
||||||
outcome = "failure"
|
outcome = "failure"
|
||||||
}
|
}
|
||||||
endTime := time.Now()
|
|
||||||
calculateStateDurations.WithLabelValues(c.algorithm, outcome).Observe(
|
calculateStateDurations.WithLabelValues(c.algorithm, outcome).Observe(
|
||||||
float64(endTime.Sub(c.startTime).Nanoseconds()) / 1000.,
|
float64(time.Since(c.startTime).Milliseconds()),
|
||||||
)
|
)
|
||||||
calculateStatePrevEventLength.WithLabelValues(c.algorithm, outcome).Observe(
|
calculateStatePrevEventLength.WithLabelValues(c.algorithm, outcome).Observe(
|
||||||
float64(c.prevEventLength),
|
float64(c.prevEventLength),
|
||||||
|
|
Loading…
Reference in a new issue