Class: Gitlab::Ci::Artifacts::Metrics
- Inherits:
-
Object
- Object
- Gitlab::Ci::Artifacts::Metrics
- Includes:
- Utils::StrongMemoize
- Defined in:
- lib/gitlab/ci/artifacts/metrics.rb
Class Method Summary collapse
Instance Method Summary collapse
- #increment_destroyed_artifacts_bytes(bytes) ⇒ Object
- #increment_destroyed_artifacts_count(size) ⇒ Object
Class Method Details
.build_completed_report_type_counter(report_type) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/gitlab/ci/artifacts/metrics.rb', line 9 def self.build_completed_report_type_counter(report_type) name = "artifact_report_#{report_type}_builds_completed_total".to_sym comment = "Number of completed builds with #{report_type} report artifacts" ::Gitlab::Metrics.counter(name, comment) end |
Instance Method Details
#increment_destroyed_artifacts_bytes(bytes) ⇒ Object
20 21 22 |
# File 'lib/gitlab/ci/artifacts/metrics.rb', line 20 def increment_destroyed_artifacts_bytes(bytes) destroyed_artifacts_bytes_counter.increment({}, bytes) end |
#increment_destroyed_artifacts_count(size) ⇒ Object
16 17 18 |
# File 'lib/gitlab/ci/artifacts/metrics.rb', line 16 def increment_destroyed_artifacts_count(size) destroyed_artifacts_counter.increment({}, size.to_i) end |