diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-01-04 12:19:45 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-01-04 12:19:45 +0100 |
commit | 825b46f8a3eb620f99192217d414b72dffe597d7 (patch) | |
tree | 4ba621669b580a0cd2863b0a9ee46c3163c97f5c /spec/lib | |
parent | 66a997a91403eef62ffd9fb789e899619d021a26 (diff) | |
download | gitlab-ce-825b46f8a3eb620f99192217d414b72dffe597d7.tar.gz |
Track total method call times per transaction
This makes it easier to see where time is spent without having to
aggregate all the individual points in the method_calls series.
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/metrics/instrumentation_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/metrics/instrumentation_spec.rb b/spec/lib/gitlab/metrics/instrumentation_spec.rb index a9003d8796b..af020f652be 100644 --- a/spec/lib/gitlab/metrics/instrumentation_spec.rb +++ b/spec/lib/gitlab/metrics/instrumentation_spec.rb @@ -48,6 +48,9 @@ describe Gitlab::Metrics::Instrumentation do allow(described_class).to receive(:transaction). and_return(transaction) + expect(transaction).to receive(:increment). + with(:method_duration, a_kind_of(Numeric)) + expect(transaction).to receive(:add_metric). with(described_class::SERIES, an_instance_of(Hash), method: 'Dummy.foo') @@ -102,6 +105,9 @@ describe Gitlab::Metrics::Instrumentation do allow(described_class).to receive(:transaction). and_return(transaction) + expect(transaction).to receive(:increment). + with(:method_duration, a_kind_of(Numeric)) + expect(transaction).to receive(:add_metric). with(described_class::SERIES, an_instance_of(Hash), method: 'Dummy#bar') |