From 4f039d0328478b45499279ab62ac97ba15ce4385 Mon Sep 17 00:00:00 2001 From: fatkodima Date: Sat, 30 Dec 2023 23:55:44 +0200 Subject: [PATCH] Fix calculation of Active Record :db_runtime metric --- activerecord/lib/active_record/runtime_registry.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/runtime_registry.rb b/activerecord/lib/active_record/runtime_registry.rb index dc127d3e518..418a6b0aa45 100644 --- a/activerecord/lib/active_record/runtime_registry.rb +++ b/activerecord/lib/active_record/runtime_registry.rb @@ -25,5 +25,5 @@ module ActiveRecord end ActiveSupport::Notifications.monotonic_subscribe("sql.active_record") do |name, start, finish, id, payload| - ActiveRecord::RuntimeRegistry.sql_runtime += (finish - start) * 1_000.0 + ActiveRecord::RuntimeRegistry.sql_runtime += (finish - start) end