Skip to content

outside_limits? method in MonitorUtilities has an error in logic causing false positives #12

@hunterae

Description

@hunterae

This line: https://github.com/livingsocial/rearview-engine/blob/master/lib/rearview/templates/utilities.rb#L43, where it says "diffs.length == 2" will always result in a false returned unless exactly two comparison_values are passed in to the parameters. This means that if I want to call the #percentage_errors method and compare today's data against last week's, two weeks ago's, and three weeks ago's, the percentage_errors will be zero, even if there are multiple errors, since I'm passing in 3 comparison metrics instead of two.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions