Commit ed715b79 authored by Pawel Chojnacki's avatar Pawel Chojnacki

use in_milliseconds rails helper

parent 3c545133
......@@ -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.
......
......@@ -36,7 +36,7 @@ module Gitlab
end
def duration_milliseconds
(duration * 1000).to_i
duration.in_milliseconds.to_i
end
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