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

Performance improvement checking the silenced state #1774

Merged
merged 6 commits into from
Mar 1, 2019
Merged

Commits on Feb 27, 2019

  1. Add benchmark for querying silences

    Signed-off-by: beorn7 <[email protected]>
    beorn7 committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    49ff877 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2019

  1. Improve Mutes performance for silences

    Add version tracking of silences states. Adding a silence to the state
    increments the version. If the version hasn't changed since the last
    time an alert was checked for being silenced, we only have to verify
    that the relevant silences are still active rather than checking the
    alert against all silences.
    
    Signed-off-by: beorn7 <[email protected]>
    beorn7 committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    3c981a9 View commit details
    Browse the repository at this point in the history
  2. Improve testing, expose a bug with zero retention time

    Signed-off-by: beorn7 <[email protected]>
    beorn7 committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    82b6349 View commit details
    Browse the repository at this point in the history
  3. Fix bug with zero retention time

    Essentially, the Silences.Expire() will in that case have no effect
    because the affected silence is immediately seen as expired from the
    storage and thus not updated. The silence will stay around in its old
    state.
    
    This fix makes sure to use the same “now” throughout the expiration
    process.
    
    Signed-off-by: beorn7 <[email protected]>
    beorn7 committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    0ab3b72 View commit details
    Browse the repository at this point in the history
  4. Remove a confusing closure

    Signed-off-by: beorn7 <[email protected]>
    beorn7 committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    46b61a3 View commit details
    Browse the repository at this point in the history
  5. Remove -u from go get for errcheck

    Without the `-u`, it will load what's required in the `go.mod`
    file. But with the `-u`, it will load new stuff once it's available,
    which makes the build non-reproducible. (Without any change in the
    `errcheck` repo, other things will happen.)
    
    Signed-off-by: beorn7 <[email protected]>
    beorn7 committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    15ed7be View commit details
    Browse the repository at this point in the history