Commit d4c768ce authored by Pawel Chojnacki's avatar Pawel Chojnacki

Rename Concern -> Methods

parent 098cf7d2
...@@ -6,7 +6,7 @@ require 'grpc/health/v1/health_services_pb' ...@@ -6,7 +6,7 @@ require 'grpc/health/v1/health_services_pb'
module Gitlab module Gitlab
module GitalyClient module GitalyClient
include Gitlab::Metrics::Concern include Gitlab::Metrics::Methods
module MigrationStatus module MigrationStatus
DISABLED = 1 DISABLED = 1
OPT_IN = 2 OPT_IN = 2
......
...@@ -2,7 +2,7 @@ module Gitlab ...@@ -2,7 +2,7 @@ module Gitlab
module Metrics module Metrics
module InfluxDb module InfluxDb
extend ActiveSupport::Concern extend ActiveSupport::Concern
include Gitlab::Metrics::Concern include Gitlab::Metrics::Methods
EXECUTION_MEASUREMENT_BUCKETS = [0.001, 0.01, 0.1, 1].freeze EXECUTION_MEASUREMENT_BUCKETS = [0.001, 0.01, 0.1, 1].freeze
......
...@@ -4,7 +4,7 @@ module Gitlab ...@@ -4,7 +4,7 @@ module Gitlab
module Metrics module Metrics
# Class for tracking timing information about method calls # Class for tracking timing information about method calls
class MethodCall class MethodCall
include Gitlab::Metrics::Concern include Gitlab::Metrics::Methods
BASE_LABELS = { module: nil, method: nil }.freeze BASE_LABELS = { module: nil, method: nil }.freeze
attr_reader :real_time, :cpu_time, :call_count, :labels attr_reader :real_time, :cpu_time, :call_count, :labels
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Gitlab module Gitlab
module Metrics module Metrics
module Concern module Methods
extend ActiveSupport::Concern extend ActiveSupport::Concern
included do included do
......
module Gitlab module Gitlab
module Metrics module Metrics
module Concern module Methods
class MetricOptions class MetricOptions
SMALL_NETWORK_BUCKETS = [0.005, 0.01, 0.1, 1, 10].freeze SMALL_NETWORK_BUCKETS = [0.005, 0.01, 0.1, 1, 10].freeze
......
...@@ -3,7 +3,7 @@ module Gitlab ...@@ -3,7 +3,7 @@ module Gitlab
module Subscribers module Subscribers
# Class for tracking the rendering timings of views. # Class for tracking the rendering timings of views.
class ActionView < ActiveSupport::Subscriber class ActionView < ActiveSupport::Subscriber
include Gitlab::Metrics::Concern include Gitlab::Metrics::Methods
define_histogram :gitlab_view_rendering_duration_seconds do define_histogram :gitlab_view_rendering_duration_seconds do
docstring 'View rendering time' docstring 'View rendering time'
base_labels Transaction::BASE_LABELS.merge({ path: nil }) base_labels Transaction::BASE_LABELS.merge({ path: nil })
......
...@@ -3,7 +3,7 @@ module Gitlab ...@@ -3,7 +3,7 @@ module Gitlab
module Subscribers module Subscribers
# Class for tracking the total query duration of a transaction. # Class for tracking the total query duration of a transaction.
class ActiveRecord < ActiveSupport::Subscriber class ActiveRecord < ActiveSupport::Subscriber
include Gitlab::Metrics::Concern include Gitlab::Metrics::Methods
attach_to :active_record attach_to :active_record
def sql(event) def sql(event)
......
...@@ -2,7 +2,7 @@ module Gitlab ...@@ -2,7 +2,7 @@ module Gitlab
module Metrics module Metrics
# Class for storing metrics information of a single transaction. # Class for storing metrics information of a single transaction.
class Transaction class Transaction
include Gitlab::Metrics::Concern include Gitlab::Metrics::Methods
# base labels shared among all transactions # base labels shared among all transactions
BASE_LABELS = { controller: nil, action: nil }.freeze BASE_LABELS = { controller: nil, action: nil }.freeze
......
require 'spec_helper' require 'spec_helper'
describe Gitlab::Metrics::Concern do describe Gitlab::Metrics::Methods do
subject { Class.new { include Gitlab::Metrics::Concern } } subject { Class.new { include Gitlab::Metrics::Methods } }
shared_context 'metric' do |metric_type, *args| shared_context 'metric' do |metric_type, *args|
let(:docstring) { 'description' } let(:docstring) { 'description' }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment