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
9360f37a
Commit
9360f37a
authored
Sep 06, 2017
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Rubocop warnings
parent
b90bf88b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
4 deletions
+1
-4
spec/lib/gitlab/metrics/samplers/ruby_sampler_spec.rb
spec/lib/gitlab/metrics/samplers/ruby_sampler_spec.rb
+0
-2
spec/lib/gitlab/metrics/subscribers/action_view_spec.rb
spec/lib/gitlab/metrics/subscribers/action_view_spec.rb
+0
-1
spec/lib/gitlab/metrics/subscribers/rails_cache_spec.rb
spec/lib/gitlab/metrics/subscribers/rails_cache_spec.rb
+1
-1
No files found.
spec/lib/gitlab/metrics/samplers/ruby_sampler_spec.rb
View file @
9360f37a
...
@@ -50,7 +50,6 @@ describe Gitlab::Metrics::Samplers::RubySampler do
...
@@ -50,7 +50,6 @@ describe Gitlab::Metrics::Samplers::RubySampler do
it
'adds a metric containing garbage collection time statistics'
do
it
'adds a metric containing garbage collection time statistics'
do
expect
(
GC
::
Profiler
).
to
receive
(
:total_time
).
and_return
(
0.24
)
expect
(
GC
::
Profiler
).
to
receive
(
:total_time
).
and_return
(
0.24
)
expect
(
sampler
.
metrics
[
:total_time
]).
to
receive
(
:set
)
expect
(
sampler
.
metrics
[
:total_time
]).
to
receive
(
:set
)
.
with
({},
240
)
.
with
({},
240
)
.
and_call_original
.
and_call_original
...
@@ -81,7 +80,6 @@ describe Gitlab::Metrics::Samplers::RubySampler do
...
@@ -81,7 +80,6 @@ describe Gitlab::Metrics::Samplers::RubySampler do
it
'ignores classes without a name'
do
it
'ignores classes without a name'
do
expect
(
Allocations
).
to
receive
(
:to_hash
).
and_return
({
Class
.
new
=>
4
})
expect
(
Allocations
).
to
receive
(
:to_hash
).
and_return
({
Class
.
new
=>
4
})
expect
(
sampler
.
metrics
[
:objects_total
]).
not_to
receive
(
:set
)
expect
(
sampler
.
metrics
[
:objects_total
]).
not_to
receive
(
:set
)
.
with
(
include
(
class:
'object_counts'
),
anything
)
.
with
(
include
(
class:
'object_counts'
),
anything
)
...
...
spec/lib/gitlab/metrics/subscribers/action_view_spec.rb
View file @
9360f37a
...
@@ -32,7 +32,6 @@ describe Gitlab::Metrics::Subscribers::ActionView do
...
@@ -32,7 +32,6 @@ describe Gitlab::Metrics::Subscribers::ActionView do
end
end
it
'observes view rendering time'
do
it
'observes view rendering time'
do
expect
(
described_class
.
metric_view_rendering_duration_seconds
)
expect
(
described_class
.
metric_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
)
...
...
spec/lib/gitlab/metrics/subscribers/rails_cache_spec.rb
View file @
9360f37a
...
@@ -210,7 +210,7 @@ describe Gitlab::Metrics::Subscribers::RailsCache do
...
@@ -210,7 +210,7 @@ describe Gitlab::Metrics::Subscribers::RailsCache do
it
'observes cache metric'
do
it
'observes cache metric'
do
expect
(
described_class
.
metric_cache_operation_duration_seconds
)
expect
(
described_class
.
metric_cache_operation_duration_seconds
)
.
to
receive
(
:observe
)
.
to
receive
(
:observe
)
.
with
(
transaction
.
labels
.
merge
(
operation: :delete
),
event
.
duration
/
1000.0
)
.
with
(
transaction
.
labels
.
merge
(
operation: :delete
),
event
.
duration
/
1000.0
)
subscriber
.
observe
(
:delete
,
event
.
duration
)
subscriber
.
observe
(
:delete
,
event
.
duration
)
end
end
...
...
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