mirror of https://github.com/rails/rails
Merge pull request #50767 from rporrasluc/fix-db-runtime-calculation
Fix calculation of SQL runtime
This commit is contained in:
commit
758e6e1a22
|
@ -34,7 +34,8 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
ActiveSupport::Notifications.monotonic_subscribe("sql.active_record") do |name, start, finish, id, payload|
|
||||
runtime = finish - start
|
||||
runtime = (finish - start) * 1_000.0
|
||||
|
||||
if payload[:async]
|
||||
ActiveRecord::RuntimeRegistry.async_sql_runtime += (runtime - payload[:lock_wait])
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue