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

Adds BaggagePropagation benchmarks for decorate #1425

Merged
merged 1 commit into from
Mar 13, 2024

Commits on Mar 13, 2024

  1. Adds BaggagePropagation benchmarks for decorate

    I tried a couple ways to optimize ExtraFactory with regards to supplying
    the extraList directly, including some special casing of singleton list
    and using `InternalPropagation.instance.withExtra(context,
    unmodifiableList(newExtra));` on a pre-sized list. The results of
    routine case always ended up with more allocation than now.
    
    This adds a benchmark, so people don't think like I did and feel there
    is a quick change that won't hurt others. It is possible that the bench
    isn't representative, or more angles need to be looked at, but this
    should help people understand where to start.
    
    ```
    Benchmark                                                               Mode     Cnt     Score     Error   Units
    BaggagePropagationBenchmarks.decorate:gc.alloc.rate.norm              sample      15   160.003 ±   0.001    B/op
    BaggagePropagationBenchmarks.decorate:p0.99                           sample             0.042             us/op
    BaggagePropagationBenchmarks.decorate_withBaggage:gc.alloc.rate.norm  sample      15    80.002 ±   0.001    B/op
    BaggagePropagationBenchmarks.decorate_withBaggage:p0.99               sample             0.042             us/op
    ```
    
    Signed-off-by: Adrian Cole <[email protected]>
    Adrian Cole committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    b8eac0c View commit details
    Browse the repository at this point in the history