Query Runtime is Summed Twice
hosamaly opened this issue · comments
Hosam Aly commented
When config.lograge_sql.keep_default_active_record_log = true
, query runtime gets summed twice: once in ActiveRecord::LogSubscriber
and again in Lograge::ActiveRecordLogSubscriber
.
Matt commented
That's a great catch @hosamaly, I suspect the culprit is this line here.
The solution would be to add a condition to that so that we only sum if config.lograge_sql.keep_default_active_record_log
is disabled.
Shouldn't be too hard of a change, would you like to give it a try?
Hosam Aly commented
I would've normally created a PR but I've got a lot on my plate at the moment. I could get back to it in a week but I hope that it will be fixed by then :)