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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
0325c237
Commit
0325c237
authored
Jan 17, 2018
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
parent
91a99136
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lib/gitlab/metrics/influx_db.rb
lib/gitlab/metrics/influx_db.rb
+3
-3
spec/lib/gitlab/metrics/subscribers/action_view_spec.rb
spec/lib/gitlab/metrics/subscribers/action_view_spec.rb
+1
-1
No files found.
lib/gitlab/metrics/influx_db.rb
View file @
0325c237
module
Gitlab
module
Gitlab
module
Metrics
module
Metrics
module
InfluxDb
module
InfluxDb
include
Gitlab
::
Metrics
::
Concern
include
Gitlab
::
Metrics
::
Concern
::
ClassMethods
include
Gitlab
::
CurrentSettings
include
Gitlab
::
CurrentSettings
extend
self
extend
self
...
@@ -106,7 +106,7 @@ module Gitlab
...
@@ -106,7 +106,7 @@ module Gitlab
real_time
=
(
real_stop
-
real_start
)
real_time
=
(
real_stop
-
real_start
)
cpu_time
=
cpu_stop
-
cpu_start
cpu_time
=
cpu_stop
-
cpu_start
real_duration_seconds
=
self
.
class
.
fetch_histogram
(
"gitlab_
#{
name
}
_real_duration_seconds"
.
to_sym
)
do
real_duration_seconds
=
fetch_histogram
(
"gitlab_
#{
name
}
_real_duration_seconds"
.
to_sym
)
do
docstring
"Measure
#{
name
}
"
docstring
"Measure
#{
name
}
"
base_labels
Transaction
::
BASE_LABELS
base_labels
Transaction
::
BASE_LABELS
buckets
EXECUTION_MEASUREMENT_BUCKETS
buckets
EXECUTION_MEASUREMENT_BUCKETS
...
@@ -114,7 +114,7 @@ module Gitlab
...
@@ -114,7 +114,7 @@ module Gitlab
real_duration_seconds
.
observe
(
trans
.
labels
,
real_time
)
real_duration_seconds
.
observe
(
trans
.
labels
,
real_time
)
cpu_duration_seconds
=
self
.
class
.
fetch_histogram
(
"gitlab_
#{
name
}
_cpu_duration_seconds"
.
to_sym
)
do
cpu_duration_seconds
=
fetch_histogram
(
"gitlab_
#{
name
}
_cpu_duration_seconds"
.
to_sym
)
do
docstring
"Measure
#{
name
}
"
docstring
"Measure
#{
name
}
"
base_labels
Transaction
::
BASE_LABELS
base_labels
Transaction
::
BASE_LABELS
buckets
EXECUTION_MEASUREMENT_BUCKETS
buckets
EXECUTION_MEASUREMENT_BUCKETS
...
...
spec/lib/gitlab/metrics/subscribers/action_view_spec.rb
View file @
0325c237
...
@@ -32,7 +32,7 @@ describe Gitlab::Metrics::Subscribers::ActionView do
...
@@ -32,7 +32,7 @@ describe Gitlab::Metrics::Subscribers::ActionView do
end
end
it
'observes view rendering time'
do
it
'observes view rendering time'
do
expect
(
subscriber
.
send
(
:metric_view_rendering_duration_seconds
)
)
expect
(
described_class
.
gitlab_view_rendering_duration_seconds
)
.
to
receive
(
:observe
)
.
to
receive
(
:observe
)
.
with
({
view:
'app/views/x.html.haml'
},
2.1
)
.
with
({
view:
'app/views/x.html.haml'
},
2.1
)
...
...
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