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

mock: add Counters, Gauges and Timers methods to get a map of all stats #90

Merged
merged 2 commits into from
Jun 18, 2020

Commits on Jun 16, 2020

  1. mock: Sink replace mutex with atomic.Value

    This improves Sink performance when called in parallel.
    
    ```
    benchmark                             old ns/op     new ns/op     delta
    BenchmarkFlushCounter-12              50.4          51.9          +2.98%
    BenchmarkFlushCounter_Parallel-12     36.5          10.5          -71.23%
    BenchmarkFlushTimer-12                52.1          49.8          -4.41%
    BenchmarkFlushTimer_Parallel-12       42.0          13.5          -67.86%
    
    benchmark                             old allocs     new allocs     delta
    BenchmarkFlushCounter-12              0              0              +0.00%
    BenchmarkFlushCounter_Parallel-12     0              0              +0.00%
    BenchmarkFlushTimer-12                0              0              +0.00%
    BenchmarkFlushTimer_Parallel-12       0              0              +0.00%
    
    benchmark                             old bytes     new bytes     delta
    BenchmarkFlushCounter-12              0             0             +0.00%
    BenchmarkFlushCounter_Parallel-12     0             0             +0.00%
    BenchmarkFlushTimer-12                0             0             +0.00%
    BenchmarkFlushTimer_Parallel-12       0             0             +0.00%
    ```
    Charlie Vieth committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    a870faf View commit details
    Browse the repository at this point in the history
  2. mock: add Counters, Gauges and Timers methods to get a map of all stats

    This PR also increases test coverage.
    Charlie Vieth committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    7cd0fdf View commit details
    Browse the repository at this point in the history