Round queue latency displayed in UI to the nearest multiple of 10ms

This commit is contained in:
Ken Hibino 2022-03-02 05:56:41 -08:00
parent af9c47d038
commit fe6898e75e

View File

@ -114,7 +114,7 @@ func toQueueStateSnapshot(info *asynq.QueueInfo) *queueStateSnapshot {
MemoryUsage: info.MemoryUsage,
Size: info.Size,
LatencyMillisec: info.Latency.Milliseconds(),
DisplayLatency: info.Latency.String(),
DisplayLatency: info.Latency.Round(10 * time.Millisecond).String(),
Active: info.Active,
Pending: info.Pending,
Scheduled: info.Scheduled,