14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/generators/gitlab/usage_metric_definition/redis_hll_generator.rb', line 14
def create_metrics
weekly_key_paths = key_paths.map { |key_path| "#{key_path}_weekly" }
weekly_params = [*weekly_key_paths, '--dir', '7d', '--class_name', 'RedisHLLMetric']
weekly_params << '--ee' if ee?
Gitlab::UsageMetricDefinitionGenerator.start(weekly_params)
monthly_key_paths = key_paths.map { |key_path| "#{key_path}_monthly" }
monthly_params = [*monthly_key_paths, '--dir', '28d', '--class_name', 'RedisHLLMetric']
monthly_params << '--ee' if ee?
Gitlab::UsageMetricDefinitionGenerator.start(monthly_params)
end
|