Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix metrics rollup floating point precision error #20233

Merged
merged 1 commit into from
Jun 2, 2020

Conversation

agrare
Copy link
Member

@agrare agrare commented Jun 2, 2020

  1) Metric::CiMixin::Rollup.perf_rollup with Vm hourly performances and Host realtime performances calling perf_rollup_range to realtime on the parent Cluster should rollup Host realtime Cluster realtime rows correctly
     Failure/Error: expect(perfs[3].cpu_usage_rate_average).to eq(24.0)     # pulled from Host realtime

       expected: 24.0
            got: 24.000000000000004

       (compared using ==)
     # ./spec/models/metric/ci_mixin/rollup_spec.rb:338:in `block (6 levels) in <top (required)>'

```
Failure/Error: expect(perfs[2].cpu_usage_rate_average).to eq(12.0)

expected: 12.0
got: 12.000000000000002

(compared using ==)
```
@miq-bot
Copy link
Member

miq-bot commented Jun 2, 2020

Checked commit agrare@9e591b5 with ruby 2.5.7, rubocop 0.69.0, haml-lint 0.28.0, and yamllint
1 file checked, 0 offenses detected
Everything looks fine. 👍

@gtanzillo gtanzillo self-assigned this Jun 2, 2020
@gtanzillo gtanzillo merged commit f6b999a into ManageIQ:master Jun 2, 2020
@agrare agrare deleted the fix_rollup_spec_fp_precision branch June 2, 2020 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants