From ecae4d77c698f24a63f34b7f0700fb27e85d0883 Mon Sep 17 00:00:00 2001 From: Martyn Loughran Date: Fri, 13 Dec 2024 13:41:53 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20logging=20of=20query=20durations,=20which?= =?UTF-8?q?=20were=20off=20by=2010x=20for=20=C2=B5s=20precision=20(#506)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nicely improves timestamp accuracy --- src/adapter/base.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapter/base.cr b/src/adapter/base.cr index d93c5a85..67c52ce5 100644 --- a/src/adapter/base.cr +++ b/src/adapter/base.cr @@ -153,7 +153,7 @@ abstract class Granite::Adapter::Base elsif elapsed_time > 0.001 "#{(elapsed_time * 1_000).trunc}ms".colorize.yellow elsif elapsed_time > 0.000_001 - "#{(elapsed_time * 100_000).trunc}µs".colorize.green + "#{(elapsed_time * 1_000_000).trunc}µs".colorize.green elsif elapsed_time > 0.000_000_001 "#{(elapsed_time * 1_000_000_000).trunc}ns".colorize.green else