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
d543485c
Commit
d543485c
authored
Nov 18, 2020
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove gitlab_transaction_cputime_seconds metric
We don't use this anywhere in our runbooks and it was undocumented.
parent
5dd595b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
16 deletions
+0
-16
lib/gitlab/metrics/transaction.rb
lib/gitlab/metrics/transaction.rb
+0
-8
spec/lib/gitlab/metrics/transaction_spec.rb
spec/lib/gitlab/metrics/transaction_spec.rb
+0
-8
No files found.
lib/gitlab/metrics/transaction.rb
View file @
d543485c
...
...
@@ -48,23 +48,15 @@ module Gitlab
@finished_at
?
(
@finished_at
-
@started_at
)
:
0.0
end
def
thread_cpu_duration
System
.
thread_cpu_duration
(
@thread_cputime_start
)
end
def
run
Thread
.
current
[
THREAD_KEY
]
=
self
@started_at
=
System
.
monotonic_time
@thread_cputime_start
=
System
.
thread_cpu_time
yield
ensure
@finished_at
=
System
.
monotonic_time
observe
(
:gitlab_transaction_cputime_seconds
,
thread_cpu_duration
)
do
buckets
SMALL_BUCKETS
end
observe
(
:gitlab_transaction_duration_seconds
,
duration
)
do
buckets
SMALL_BUCKETS
end
...
...
spec/lib/gitlab/metrics/transaction_spec.rb
View file @
d543485c
...
...
@@ -20,14 +20,6 @@ RSpec.describe Gitlab::Metrics::Transaction do
end
end
describe
'#thread_cpu_duration'
do
it
'returns the duration of a transaction in seconds'
do
transaction
.
run
{
}
expect
(
transaction
.
thread_cpu_duration
).
to
be
>
0
end
end
describe
'#run'
do
it
'yields the supplied block'
do
expect
{
|
b
|
transaction
.
run
(
&
b
)
}.
to
yield_control
...
...
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