accounting: fix Prometheus metrics to be the same as core/stats
In 04aa6969a4
we updated the displayed speed to be a rolling
average in core/stats and the progress output but we didn't update the
Prometheus metrics.
This patch updates the Prometheus metrics too.
Fixes #7053
This commit is contained in:
parent
055206c4ee
commit
45255bccb3
1 changed files with 1 additions and 7 deletions
|
@ -135,13 +135,7 @@ func (s *StatsInfo) RemoteStats() (out rc.Params, err error) {
|
|||
//
|
||||
// Call with lock held
|
||||
func (s *StatsInfo) speed() float64 {
|
||||
dt := s.totalDuration()
|
||||
dtSeconds := dt.Seconds()
|
||||
speed := 0.0
|
||||
if dt > 0 {
|
||||
speed = float64(s.bytes) / dtSeconds
|
||||
}
|
||||
return speed
|
||||
return s.average.speed
|
||||
}
|
||||
|
||||
// timeRange is a start and end time of a transfer
|
||||
|
|
Loading…
Reference in a new issue