Commit ed715b79 authored by Pawel Chojnacki's avatar Pawel Chojnacki

use in_milliseconds rails helper

parent 3c545133
...@@ -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.
......
...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment