mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fn: fix math error in calculating msecs in container states (#1157)
This commit is contained in:
@@ -142,7 +142,7 @@ func (c *containerState) UpdateState(ctx context.Context, newState ContainerStat
|
||||
|
||||
timeKey := containerTimeKeys[oldState]
|
||||
if timeKey != "" {
|
||||
stats.Record(ctx, containerTimeMeasures[oldState].M(int64(now.Sub(before).Round(time.Millisecond))))
|
||||
stats.Record(ctx, containerTimeMeasures[oldState].M(int64(now.Sub(before)/time.Millisecond)))
|
||||
}
|
||||
|
||||
// update new state stats
|
||||
|
||||
Reference in New Issue
Block a user