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

Improve CollectAndCount #753

Merged
merged 1 commit into from May 15, 2020
Merged

Improve CollectAndCount #753

merged 1 commit into from May 15, 2020

Commits on May 13, 2020

  1. Improve CollectAndCount

    Now that we have also added CollectAndLint and GatherAndLint, I
    thought we should bring CollectAndCount in line. So:
    
    - Add GatherAndCount.
    - Add filtering by metric name.
    - Add tests.
    
    Minor wart: CollectAndCount should now return `(int, error)`, but that
    would be a breaking change as the current version just returns
    `int`. I decided to let the new version panic when it should return an
    error. An error is anyway very unlikely, so the biggest annoyance here
    is really just the inconsistency.
    
    Signed-off-by: beorn7 <beorn@grafana.com>
    beorn7 committed May 13, 2020
    Copy the full SHA
    0577ef6 View commit details
    Browse the repository at this point in the history