summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/performance_bar/stats_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/performance_bar/stats_spec.rb')
-rw-r--r--spec/lib/gitlab/performance_bar/stats_spec.rb16
1 files changed, 14 insertions, 2 deletions
diff --git a/spec/lib/gitlab/performance_bar/stats_spec.rb b/spec/lib/gitlab/performance_bar/stats_spec.rb
index ad11eca56d1..b4f90745ee7 100644
--- a/spec/lib/gitlab/performance_bar/stats_spec.rb
+++ b/spec/lib/gitlab/performance_bar/stats_spec.rb
@@ -23,11 +23,23 @@ RSpec.describe Gitlab::PerformanceBar::Stats do
expect(logger).to receive(:info)
.with({ duration_ms: 1.096, filename: 'lib/gitlab/pagination/offset_pagination.rb',
method_path: 'lib/gitlab/pagination/offset_pagination.rb:add_pagination_headers',
- count: 1, request_id: 'foo', type: :sql })
+ count: 1, request_id: 'foo', query_type: 'active-record' })
expect(logger).to receive(:info)
.with({ duration_ms: 1.634, filename: 'lib/api/helpers.rb',
method_path: 'lib/api/helpers.rb:find_project',
- count: 2, request_id: 'foo', type: :sql })
+ count: 2, request_id: 'foo', query_type: 'active-record' })
+ expect(logger).to receive(:info)
+ .with({ duration_ms: 23.709, filename: 'lib/gitlab/gitaly_client/commit_service.rb',
+ method_path: 'lib/gitlab/gitaly_client/commit_service.rb:each',
+ count: 1, request_id: 'foo', query_type: 'gitaly' })
+ expect(logger).to receive(:info)
+ .with({ duration_ms: 6.678, filename: 'lib/gitlab/gitaly_client/commit_service.rb',
+ method_path: 'lib/gitlab/gitaly_client/commit_service.rb:call_find_commit',
+ count: 1, request_id: 'foo', query_type: 'gitaly' })
+ expect(logger).to receive(:info)
+ .with({ duration_ms: 0.155, filename: 'lib/feature.rb',
+ method_path: 'lib/feature.rb:enabled?',
+ count: 1, request_id: 'foo', query_type: 'redis' })
subject
end