summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorJan Provaznik <jprovaznik@gitlab.com>2019-04-02 20:05:56 +0000
committerRobert Speicher <rspeicher@gmail.com>2019-04-02 20:05:56 +0000
commit0c45e268a1523797712380eca479e18e5b59cc2e (patch)
treebe69ba6f0a58b089bda2aa2a6e1223c45ca39cdc /spec/lib
parent9f6ab1a5953eff45da9b8d2a5fcb92fe7b44a95d (diff)
downloadgitlab-ce-0c45e268a1523797712380eca479e18e5b59cc2e.tar.gz
Revert "Merge branch 'jprovazn-graphql-prometheus' into 'master'"
This reverts merge request !26569
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/graphql/tracing_spec.rb35
1 files changed, 0 insertions, 35 deletions
diff --git a/spec/lib/gitlab/graphql/tracing_spec.rb b/spec/lib/gitlab/graphql/tracing_spec.rb
deleted file mode 100644
index 6bae737d0f6..00000000000
--- a/spec/lib/gitlab/graphql/tracing_spec.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-describe Gitlab::Graphql::Tracing do
- let!(:graphql_duration_seconds) { double('Gitlab::Metrics::NullMetric') }
-
- before do
- allow(Gitlab::Metrics)
- .to receive(:histogram)
- .with(:graphql_duration_seconds, 'GraphQL execution time')
- .and_return(graphql_duration_seconds)
- end
-
- it 'updates graphql histogram with expected labels' do
- query = 'query { users { id } }'
-
- expect_metric('graphql.lex', 'lex')
- expect_metric('graphql.parse', 'parse')
- expect_metric('graphql.validate', 'validate')
- expect_metric('graphql.analyze', 'analyze_multiplex')
- expect_metric('graphql.execute', 'execute_query_lazy')
- expect_metric('graphql.execute', 'execute_multiplex')
-
- GitlabSchema.execute(query)
- end
-
- private
-
- def expect_metric(platform_key, key)
- expect(graphql_duration_seconds)
- .to receive(:observe)
- .with({ platform_key: platform_key, key: key }, be > 0.0)
- end
-end