Skip to content

Commit a88ee05

Browse files
committed
Fix calculation of SQL runtime
1 parent 0656787 commit a88ee05

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

activerecord/lib/active_record/runtime_registry.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ def reset
3434
end
3535

3636
ActiveSupport::Notifications.monotonic_subscribe("sql.active_record") do |name, start, finish, id, payload|
37-
runtime = finish - start
37+
runtime = (finish - start) * 1_000.0
38+
3839
if payload[:async]
3940
ActiveRecord::RuntimeRegistry.async_sql_runtime += (runtime - payload[:lock_wait])
4041
end

0 commit comments

Comments
 (0)