Commit 189b5c3c authored by Yorick Peterse's avatar Yorick Peterse

Remove Sherlock usage from the performance bar

Sherlock::Query generates a backtrace on every call to "new", which is
very slow. Formatter queries are also not displayed properly due to the
lack of "white-space: pre" in the CSS. We took a look at fixing this,
but the produced output is not really better than just displaying
queries on one line.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/39351
parent bd39b441
......@@ -36,8 +36,8 @@ module Gitlab
end
def track_query(raw_query, bindings, start, finish)
query = Gitlab::Sherlock::Query.new(raw_query, start, finish)
query_info = { duration: query.duration.round(3), sql: query.formatted_query }
duration = finish - start
query_info = { duration: duration.round(3), sql: raw_query }
PEEK_DB_CLIENT.query_details << query_info
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment