debian-mirror-gitlab/lib/gitlab/usage/metrics/instrumentations/count_issues_metric.rb
2022-07-23 20:15:48 +02:00

20 lines
379 B
Ruby

# frozen_string_literal: true
module Gitlab
module Usage
module Metrics
module Instrumentations
class CountIssuesMetric < DatabaseMetric
operation :count
start { Issue.minimum(:id) }
finish { Issue.maximum(:id) }
relation { Issue }
cache_start_and_finish_as :issue
end
end
end
end
end