Rename Concern -> Methods

This commit is contained in:
Pawel Chojnacki 2018-01-29 12:33:08 +01:00
parent 098cf7d257
commit d4c768ce09
9 changed files with 10 additions and 10 deletions

View file

@ -6,7 +6,7 @@ require 'grpc/health/v1/health_services_pb'
module Gitlab
module GitalyClient
include Gitlab::Metrics::Concern
include Gitlab::Metrics::Methods
module MigrationStatus
DISABLED = 1
OPT_IN = 2

View file

@ -2,7 +2,7 @@ module Gitlab
module Metrics
module InfluxDb
extend ActiveSupport::Concern
include Gitlab::Metrics::Concern
include Gitlab::Metrics::Methods
EXECUTION_MEASUREMENT_BUCKETS = [0.001, 0.01, 0.1, 1].freeze

View file

@ -4,7 +4,7 @@ module Gitlab
module Metrics
# Class for tracking timing information about method calls
class MethodCall
include Gitlab::Metrics::Concern
include Gitlab::Metrics::Methods
BASE_LABELS = { module: nil, method: nil }.freeze
attr_reader :real_time, :cpu_time, :call_count, :labels

View file

@ -2,7 +2,7 @@
module Gitlab
module Metrics
module Concern
module Methods
extend ActiveSupport::Concern
included do

View file

@ -1,6 +1,6 @@
module Gitlab
module Metrics
module Concern
module Methods
class MetricOptions
SMALL_NETWORK_BUCKETS = [0.005, 0.01, 0.1, 1, 10].freeze

View file

@ -3,7 +3,7 @@ module Gitlab
module Subscribers
# Class for tracking the rendering timings of views.
class ActionView < ActiveSupport::Subscriber
include Gitlab::Metrics::Concern
include Gitlab::Metrics::Methods
define_histogram :gitlab_view_rendering_duration_seconds do
docstring 'View rendering time'
base_labels Transaction::BASE_LABELS.merge({ path: nil })

View file

@ -3,7 +3,7 @@ module Gitlab
module Subscribers
# Class for tracking the total query duration of a transaction.
class ActiveRecord < ActiveSupport::Subscriber
include Gitlab::Metrics::Concern
include Gitlab::Metrics::Methods
attach_to :active_record
def sql(event)

View file

@ -2,7 +2,7 @@ module Gitlab
module Metrics
# Class for storing metrics information of a single transaction.
class Transaction
include Gitlab::Metrics::Concern
include Gitlab::Metrics::Methods
# base labels shared among all transactions
BASE_LABELS = { controller: nil, action: nil }.freeze

View file

@ -1,7 +1,7 @@
require 'spec_helper'
describe Gitlab::Metrics::Concern do
subject { Class.new { include Gitlab::Metrics::Concern } }
describe Gitlab::Metrics::Methods do
subject { Class.new { include Gitlab::Metrics::Methods } }
shared_context 'metric' do |metric_type, *args|
let(:docstring) { 'description' }