summaryrefslogtreecommitdiff
path: root/spec/fixtures/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 09:08:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 09:08:42 +0000
commitb76ae638462ab0f673e5915986070518dd3f9ad3 (patch)
treebdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/fixtures/lib
parent434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff)
downloadgitlab-ce-b76ae638462ab0f673e5915986070518dd3f9ad3.tar.gz
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/fixtures/lib')
-rw-r--r--spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric.yml3
-rw-r--r--spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_ee.yml3
-rw-r--r--spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_name_suggestions.yml3
-rw-r--r--spec/fixtures/lib/generators/gitlab/usage_metric_generator/sample_database_metric.rb17
-rw-r--r--spec/fixtures/lib/generators/gitlab/usage_metric_generator/sample_generic_metric.rb (renamed from spec/fixtures/lib/generators/gitlab/usage_metric_generator/sample_metric.rb)5
5 files changed, 26 insertions, 5 deletions
diff --git a/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric.yml b/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric.yml
index f694e617320..8495d983d10 100644
--- a/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric.yml
+++ b/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric.yml
@@ -12,7 +12,8 @@ milestone: "13.9"
introduced_by_url:
time_frame: 7d
data_source:
-data_category: Operational
+data_category: operational
+performance_indicator_type:
distribution:
- ce
# Add here corresponding tiers
diff --git a/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_ee.yml b/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_ee.yml
index 9de4d2a5644..82e9af5b04f 100644
--- a/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_ee.yml
+++ b/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_ee.yml
@@ -12,7 +12,8 @@ milestone: "13.9"
introduced_by_url:
time_frame: 7d
data_source:
-data_category: Optional
+data_category: optional
+performance_indicator_type:
distribution:
- ee
tier:
diff --git a/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_name_suggestions.yml b/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_name_suggestions.yml
index 0e7de369c82..aad7dc76290 100644
--- a/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_name_suggestions.yml
+++ b/spec/fixtures/lib/generators/gitlab/usage_metric_definition_generator/sample_metric_with_name_suggestions.yml
@@ -13,7 +13,8 @@ milestone: "13.9"
introduced_by_url:
time_frame: 7d
data_source:
-data_category: Optional
+data_category: optional
+performance_indicator_type:
distribution:
- ce
- ee
diff --git a/spec/fixtures/lib/generators/gitlab/usage_metric_generator/sample_database_metric.rb b/spec/fixtures/lib/generators/gitlab/usage_metric_generator/sample_database_metric.rb
new file mode 100644
index 00000000000..abbe9a8c332
--- /dev/null
+++ b/spec/fixtures/lib/generators/gitlab/usage_metric_generator/sample_database_metric.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Usage
+ module Metrics
+ module Instrumentations
+ class CountFooMetric < DatabaseMetric
+ operation :count
+
+ relation do
+ # Insert ActiveRecord relation here
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/spec/fixtures/lib/generators/gitlab/usage_metric_generator/sample_metric.rb b/spec/fixtures/lib/generators/gitlab/usage_metric_generator/sample_generic_metric.rb
index 9816ff7c9eb..df6152a5659 100644
--- a/spec/fixtures/lib/generators/gitlab/usage_metric_generator/sample_metric.rb
+++ b/spec/fixtures/lib/generators/gitlab/usage_metric_generator/sample_generic_metric.rb
@@ -4,8 +4,9 @@ module Gitlab
module Usage
module Metrics
module Instrumentations
- class CountFooMetric < RedisHLLMetric
- def value
+ class CountFooMetric < GenericMetric
+ value do
+ # Insert metric code logic here
end
end
end