diff options
author | Rémy Coutable <remy@rymai.me> | 2017-06-07 20:55:07 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-06-09 18:21:39 +0300 |
commit | e85914532970d61d53f025f3ff0d85891bab2637 (patch) | |
tree | a54bac63e63570a31ff31d4cafffc31e1636a1a0 /lib/gitlab | |
parent | 55631e3d52dd2e16b69b02ffc99207b60a22989e (diff) |
Fix Rubocop offenses, improve SQL duration format and changelog entry
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/performance_bar/peek_query_tracker.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/performance_bar/peek_query_tracker.rb b/lib/gitlab/performance_bar/peek_query_tracker.rb index 479396f6664..7ab80f5ee0f 100644 --- a/lib/gitlab/performance_bar/peek_query_tracker.rb +++ b/lib/gitlab/performance_bar/peek_query_tracker.rb @@ -30,7 +30,8 @@ module Gitlab def track_query(raw_query, bindings, start, finish) query = Gitlab::Sherlock::Query.new(raw_query, start, finish) - query_info = { duration: query.duration.round(4), sql: query.formatted_query } + query_info = { duration: '%.3f' % query.duration, sql: query.formatted_query } + PEEK_DB_CLIENT.query_details << query_info end end |