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
Léo-Paul Géneau
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
Show 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
...
@@ -27,7 +27,7 @@ module Gitlab
@transaction
=
transaction
@transaction
=
transaction
@name
=
name
@name
=
name
@labels
=
{
module:
@module_name
,
method:
@method_name
}
@labels
=
{
module:
@module_name
,
method:
@method_name
}
@real_time_seconds
=
0
@real_time_seconds
=
0
.0
@cpu_time
=
0
@cpu_time
=
0
@call_count
=
0
@call_count
=
0
end
end
...
@@ -53,7 +53,7 @@ module Gitlab
...
@@ -53,7 +53,7 @@ module Gitlab
end
end
def
real_time_milliseconds
def
real_time_milliseconds
(
real_time_seconds
*
1000.0
)
.
to_i
real_time_seconds
.
in_milliseconds
.
to_i
end
end
# Returns a Metric instance of the current method call.
# Returns a Metric instance of the current method call.
...
...
lib/gitlab/metrics/transaction.rb
View file @
ed715b79
...
@@ -36,7 +36,7 @@ module Gitlab
...
@@ -36,7 +36,7 @@ module Gitlab
end
end
def
duration_milliseconds
def
duration_milliseconds
(
duration
*
1000
)
.
to_i
duration
.
in_milliseconds
.
to_i
end
end
def
allocated_memory
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