diff options
author | Sean McGivern <sean@gitlab.com> | 2018-03-08 12:10:59 +0000 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-03-13 14:09:42 +0000 |
commit | 582447d9ae0074e0843c60df92d7c2ab09b23c80 (patch) | |
tree | 5239568d0b6fbb8a077e51f1a6091ad7f5e51fb9 /lib/peek | |
parent | 5bfa93e38ac56f22a71d2d0720e523a5acda12ee (diff) | |
download | gitlab-ce-582447d9ae0074e0843c60df92d7c2ab09b23c80.tar.gz |
Capture Gitaly calls that don't go through `migrate`
Diffstat (limited to 'lib/peek')
-rw-r--r-- | lib/peek/views/gitaly.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/peek/views/gitaly.rb b/lib/peek/views/gitaly.rb index 79851640318..ab35f7a2258 100644 --- a/lib/peek/views/gitaly.rb +++ b/lib/peek/views/gitaly.rb @@ -20,16 +20,17 @@ module Peek private def details - ::Gitlab::GitalyClient.call_details + ::Gitlab::GitalyClient.list_call_details + .values .sort { |a, b| b[:duration] <=> a[:duration] } .map(&method(:format_call_details)) end def format_call_details(call) - pretty_request = call[:request].reject { |k, v| v.blank? }.to_h.pretty_inspect + pretty_request = call[:request]&.reject { |k, v| v.blank? }.to_h.pretty_inspect call.merge(duration: (call[:duration] * 1000).round(3), - request: pretty_request) + request: pretty_request || {}) end def formatted_duration |