Skip to content

adjust metrics methods for calculating CPU time to match specs, add new specs for fixnum case

What does this MR do?

I noticed an inconsistency with the intended output from https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/metrics/system.rb#L47-59

It states that it should return a Float, and the spec expects a float, however :millisecond will return a Fixnum. I just set the precondition of the argument to :float_millisecond per the documentation on Process

Are there points in the code the reviewer needs to double check?

I've written specs to test when the :millisecond precision param is passed into the methods, other than that nothing really.

Why was this MR needed?

The specs fail due to expecting a Float. I'm testing on Ubuntu 16.04

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Merge request reports

Loading