Commit 9e573001 authored by Avielle Wolfe's avatar Avielle Wolfe

Track step duration with monotonic time

Because it never jumps, monotonic time is more reliable for creating this data set
parent c7fdcbb9
......@@ -14,12 +14,15 @@ module Gitlab
def build!
@sequence.each do |step_class|
step_start = Time.now
step_start = ::Gitlab::Metrics::System.monotonic_time
step = step_class.new(@pipeline, @command)
step.perform!
@command.observe_step_duration(step_class, Time.now - step_start)
@command.observe_step_duration(
step_class,
::Gitlab::Metrics::System.monotonic_time - step_start
)
break if step.break?
end
......
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