Fix tests
This commit is contained in:
parent
91a991367e
commit
0325c23732
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
module Gitlab
|
||||
module Metrics
|
||||
module InfluxDb
|
||||
include Gitlab::Metrics::Concern
|
||||
include Gitlab::Metrics::Concern::ClassMethods
|
||||
include Gitlab::CurrentSettings
|
||||
extend self
|
||||
|
||||
|
@ -106,7 +106,7 @@ module Gitlab
|
|||
real_time = (real_stop - real_start)
|
||||
cpu_time = cpu_stop - cpu_start
|
||||
|
||||
real_duration_seconds = self.class.fetch_histogram("gitlab_#{name}_real_duration_seconds".to_sym) do
|
||||
real_duration_seconds = fetch_histogram("gitlab_#{name}_real_duration_seconds".to_sym) do
|
||||
docstring "Measure #{name}"
|
||||
base_labels Transaction::BASE_LABELS
|
||||
buckets EXECUTION_MEASUREMENT_BUCKETS
|
||||
|
@ -114,7 +114,7 @@ module Gitlab
|
|||
|
||||
real_duration_seconds.observe(trans.labels, real_time)
|
||||
|
||||
cpu_duration_seconds = self.class.fetch_histogram("gitlab_#{name}_cpu_duration_seconds".to_sym) do
|
||||
cpu_duration_seconds = fetch_histogram("gitlab_#{name}_cpu_duration_seconds".to_sym) do
|
||||
docstring "Measure #{name}"
|
||||
base_labels Transaction::BASE_LABELS
|
||||
buckets EXECUTION_MEASUREMENT_BUCKETS
|
||||
|
|
|
@ -32,7 +32,7 @@ describe Gitlab::Metrics::Subscribers::ActionView do
|
|||
end
|
||||
|
||||
it 'observes view rendering time' do
|
||||
expect(subscriber.send(:metric_view_rendering_duration_seconds))
|
||||
expect(described_class.gitlab_view_rendering_duration_seconds)
|
||||
.to receive(:observe)
|
||||
.with({ view: 'app/views/x.html.haml' }, 2.1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue