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
ed715b79
Commit
ed715b79
authored
Dec 19, 2017
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use in_milliseconds rails helper
parent
3c545133
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
lib/gitlab/metrics/method_call.rb
lib/gitlab/metrics/method_call.rb
+2
-2
lib/gitlab/metrics/transaction.rb
lib/gitlab/metrics/transaction.rb
+1
-1
No files found.
lib/gitlab/metrics/method_call.rb
View file @
ed715b79
...
...
@@ -27,7 +27,7 @@ module Gitlab
@transaction
=
transaction
@name
=
name
@labels
=
{
module:
@module_name
,
method:
@method_name
}
@real_time_seconds
=
0
@real_time_seconds
=
0
.0
@cpu_time
=
0
@call_count
=
0
end
...
...
@@ -53,7 +53,7 @@ module Gitlab
end
def
real_time_milliseconds
(
real_time_seconds
*
1000.0
)
.
to_i
real_time_seconds
.
in_milliseconds
.
to_i
end
# Returns a Metric instance of the current method call.
...
...
lib/gitlab/metrics/transaction.rb
View file @
ed715b79
...
...
@@ -36,7 +36,7 @@ module Gitlab
end
def
duration_milliseconds
(
duration
*
1000
)
.
to_i
duration
.
in_milliseconds
.
to_i
end
def
allocated_memory
...
...
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