diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-09 03:07:18 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-09 03:07:18 +0000 |
commit | 78f70f8ae3786a57d57eae1e95ce728acc783463 (patch) | |
tree | 10d816f42c472e3af4ae2d13ba1be217e2f7816d /lib/gitlab/usage | |
parent | a56c4bff3e2c82422bf2cc250e3828f71feb7876 (diff) | |
download | gitlab-ce-78f70f8ae3786a57d57eae1e95ce728acc783463.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/usage')
-rw-r--r-- | lib/gitlab/usage/service_ping/legacy_metric_metadata_decorator.rb | 19 | ||||
-rw-r--r-- | lib/gitlab/usage/service_ping/legacy_metric_timing_decorator.rb | 18 |
2 files changed, 19 insertions, 18 deletions
diff --git a/lib/gitlab/usage/service_ping/legacy_metric_metadata_decorator.rb b/lib/gitlab/usage/service_ping/legacy_metric_metadata_decorator.rb new file mode 100644 index 00000000000..db313bc1fbe --- /dev/null +++ b/lib/gitlab/usage/service_ping/legacy_metric_metadata_decorator.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Gitlab + module Usage + module ServicePing + class LegacyMetricMetadataDecorator < SimpleDelegator + attr_reader :duration, :error + + delegate :class, :is_a?, :kind_of?, :nil?, to: :__getobj__ + + def initialize(value, duration, error: nil) + @duration = duration + @error = error + super(value) + end + end + end + end +end diff --git a/lib/gitlab/usage/service_ping/legacy_metric_timing_decorator.rb b/lib/gitlab/usage/service_ping/legacy_metric_timing_decorator.rb deleted file mode 100644 index e32dcd3777b..00000000000 --- a/lib/gitlab/usage/service_ping/legacy_metric_timing_decorator.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module Usage - module ServicePing - class LegacyMetricTimingDecorator < SimpleDelegator - attr_reader :duration - - delegate :class, :is_a?, :kind_of?, to: :__getobj__ - - def initialize(value, duration) - @duration = duration - super(value) - end - end - end - end -end |