From fe6898e75e6f1ec17f3076fc0fa8eda77e460c14 Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Wed, 2 Mar 2022 05:56:41 -0800 Subject: [PATCH] Round queue latency displayed in UI to the nearest multiple of 10ms --- conversion_helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conversion_helpers.go b/conversion_helpers.go index 73d91df..764e57a 100644 --- a/conversion_helpers.go +++ b/conversion_helpers.go @@ -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,