Please sign in to comment.
Reset ActiveRecord::LogSubscriber runtime at the start of each request
Previously the runtime was reset implicitly when #cleanup_view_runtime was called at the end of most requests. However, this doesn't happen when the request redirects, or send_file is called. Consequently, the ActiveRecord runtime recorded in the logs included the time taken for both the current request and the previous redirect. Explicitly resetting at the start of each request ensures that this can't happen, no matter what occurs previously.
- Loading branch information...
Showing with 18 additions and 0 deletions.