Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
d4c768ce
Commit
d4c768ce
authored
Jan 29, 2018
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename Concern -> Methods
parent
098cf7d2
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
10 additions
and
10 deletions
+10
-10
lib/gitlab/gitaly_client.rb
lib/gitlab/gitaly_client.rb
+1
-1
lib/gitlab/metrics/influx_db.rb
lib/gitlab/metrics/influx_db.rb
+1
-1
lib/gitlab/metrics/method_call.rb
lib/gitlab/metrics/method_call.rb
+1
-1
lib/gitlab/metrics/methods.rb
lib/gitlab/metrics/methods.rb
+1
-1
lib/gitlab/metrics/methods/metric_options.rb
lib/gitlab/metrics/methods/metric_options.rb
+1
-1
lib/gitlab/metrics/subscribers/action_view.rb
lib/gitlab/metrics/subscribers/action_view.rb
+1
-1
lib/gitlab/metrics/subscribers/active_record.rb
lib/gitlab/metrics/subscribers/active_record.rb
+1
-1
lib/gitlab/metrics/transaction.rb
lib/gitlab/metrics/transaction.rb
+1
-1
spec/lib/gitlab/metrics/methods_spec.rb
spec/lib/gitlab/metrics/methods_spec.rb
+2
-2
No files found.
lib/gitlab/gitaly_client.rb
View file @
d4c768ce
...
@@ -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
...
...
lib/gitlab/metrics/influx_db.rb
View file @
d4c768ce
...
@@ -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
...
...
lib/gitlab/metrics/method_call.rb
View file @
d4c768ce
...
@@ -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
...
...
lib/gitlab/metrics/
concern
.rb
→
lib/gitlab/metrics/
methods
.rb
View file @
d4c768ce
...
@@ -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
...
...
lib/gitlab/metrics/
concern
/metric_options.rb
→
lib/gitlab/metrics/
methods
/metric_options.rb
View file @
d4c768ce
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
...
...
lib/gitlab/metrics/subscribers/action_view.rb
View file @
d4c768ce
...
@@ -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
})
...
...
lib/gitlab/metrics/subscribers/active_record.rb
View file @
d4c768ce
...
@@ -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
)
...
...
lib/gitlab/metrics/transaction.rb
View file @
d4c768ce
...
@@ -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
...
...
spec/lib/gitlab/metrics/
concern
_spec.rb
→
spec/lib/gitlab/metrics/
methods
_spec.rb
View file @
d4c768ce
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'
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment