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
This commit is contained in:
parent
bd39b441a1
commit
189b5c3c39
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue