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

Fix logging with interest cache #2165

Open
wants to merge 19 commits into
base: v0.1.x
Choose a base branch
from

Commits on Aug 29, 2022

  1. Fix logging with interest cache

    When the interest cache is configured as part of initing the `LogTracer` before
    the global dispatcher is set, the main thread fails to log. The problem
    is that the interests cache registers a dummy callsite. With
    tokio-rs#2083 the callsite registration
    changed to use `dispatcher::get_default`. This call internally sets the
    thread local `default` dispatcher to `Dispatch::none` when there isn't
    yet any dispatcher set. This `default` dispatcher isn't overwritten when
    setting the global dispatcher. The solution is to not store the
    `Dispatch::none` as `default` dispatcher.
    bkchr committed Aug 29, 2022
    Configuration menu
    Copy the full SHA
    8c06e78 View commit details
    Browse the repository at this point in the history
  2. remove Deref impl and unwinding

    this brings performance of most of the `subscriber.rs` benchmarks closer
    to where they were on `v0.1.x` prior to this change (commit
    cf98b73):
    
    ```
         Running unittests (target/release/deps/subscriber-b3c6395267c4f6e6)
    Gnuplot not found, disabling plotting
    span_no_fields          time:   [18.814 ns 18.900 ns 18.967 ns]
                            change: [-17.562% -17.045% -16.552%] (p = 0.00 < 0.05)
                            Performance has improved.
    
    enter_span              time:   [2.8471 ns 2.8620 ns 2.8799 ns]
                            change: [+7.5923% +8.2941% +8.9390%] (p = 0.00 < 0.05)
                            Performance has regressed.
    Found 20 outliers among 100 measurements (20.00%)
      2 (2.00%) low severe
      2 (2.00%) high mild
      16 (16.00%) high severe
    
    span_repeatedly         time:   [3.6959 us 3.6988 us 3.7017 us]
                            change: [-3.0008% -2.9276% -2.8528%] (p = 0.00 < 0.05)
                            Performance has improved.
    Found 1 outliers among 100 measurements (1.00%)
      1 (1.00%) high mild
    
    span_with_fields        time:   [56.854 ns 56.911 ns 56.975 ns]
                            change: [-3.5756% -3.4955% -3.3997%] (p = 0.00 < 0.05)
                            Performance has improved.
    Found 20 outliers among 100 measurements (20.00%)
      1 (1.00%) low mild
      3 (3.00%) high mild
      16 (16.00%) high severe
    
    span_with_fields_record time:   [317.15 ns 318.02 ns 318.94 ns]
                            change: [+3.1700% +3.3617% +3.5555%] (p = 0.00 < 0.05)
                            Performance has regressed.
    Found 9 outliers among 100 measurements (9.00%)
      4 (4.00%) high mild
      5 (5.00%) high severe
    
    dispatch/no_dispatch_get_ref
                            time:   [17.823 ns 17.966 ns 18.134 ns]
                            change: [-10.826% -10.144% -9.4796%] (p = 0.00 < 0.05)
                            Performance has improved.
    Found 3 outliers among 100 measurements (3.00%)
      3 (3.00%) high mild
    dispatch/no_dispatch_get_clone
                            time:   [24.984 ns 25.013 ns 25.041 ns]
                            change: [-6.7511% -6.6349% -6.5020%] (p = 0.00 < 0.05)
                            Performance has improved.
    Found 8 outliers among 100 measurements (8.00%)
      1 (1.00%) low severe
      2 (2.00%) low mild
      1 (1.00%) high mild
      4 (4.00%) high severe
    dispatch/get_ref        time:   [3.8508 ns 3.8532 ns 3.8555 ns]
                            change: [-26.641% -26.518% -26.404%] (p = 0.00 < 0.05)
                            Performance has improved.
    Found 6 outliers among 100 measurements (6.00%)
      1 (1.00%) low mild
      2 (2.00%) high mild
      3 (3.00%) high severe
    dispatch/get_clone      time:   [10.737 ns 10.750 ns 10.765 ns]
                            change: [-11.632% -11.429% -11.219%] (p = 0.00 < 0.05)
                            Performance has improved.
    Found 17 outliers among 100 measurements (17.00%)
      3 (3.00%) low mild
      2 (2.00%) high mild
      12 (12.00%) high severe
    
    Gnuplot not found, disabling plotting
    ```
    
    performance of `get_default` where there is no current subscriber is
    still significantly regressed vs `v0.1.x`, due to `Arc` allocations for
    `Dispatch::none` occurring every time. i think this can be solved as well.
    hawkw authored and bkchr committed Aug 29, 2022
    Configuration menu
    Copy the full SHA
    694f6f8 View commit details
    Browse the repository at this point in the history
  3. reduce overhead of re-allocating Dispatch::none

    Signed-off-by: Eliza Weisman <eliza@buoyant.io>
    hawkw authored and bkchr committed Aug 29, 2022
    Configuration menu
    Copy the full SHA
    41e0147 View commit details
    Browse the repository at this point in the history
  4. Remove unrelated change

    bkchr committed Aug 29, 2022
    Configuration menu
    Copy the full SHA
    3255715 View commit details
    Browse the repository at this point in the history
  5. Something

    bkchr committed Aug 29, 2022
    Configuration menu
    Copy the full SHA
    834a633 View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2022

  1. Clean up

    bkchr committed Aug 30, 2022
    Configuration menu
    Copy the full SHA
    58e1bb9 View commit details
    Browse the repository at this point in the history
  2. Fix tests

    bkchr committed Aug 30, 2022
    Configuration menu
    Copy the full SHA
    45c477e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b6d6ff7 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2022

  1. Fix compilation

    bkchr committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    857f740 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2022

  1. Make Dispatch::none() const

    It also rewrites the logic on how the `current` dispatcher is determined.
    bkchr committed Sep 3, 2022
    Configuration menu
    Copy the full SHA
    65122c7 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2022

  1. Fix test

    bkchr committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    89dafca View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2022

  1. Make CI happy

    bkchr committed Sep 13, 2022
    Configuration menu
    Copy the full SHA
    34cb851 View commit details
    Browse the repository at this point in the history
  2. Fix test

    bkchr committed Sep 13, 2022
    Configuration menu
    Copy the full SHA
    a6321bd View commit details
    Browse the repository at this point in the history
  3. More fixes

    bkchr committed Sep 13, 2022
    Configuration menu
    Copy the full SHA
    5d40c4a View commit details
    Browse the repository at this point in the history
  4. Bump MSRV

    bkchr committed Sep 13, 2022
    Configuration menu
    Copy the full SHA
    0575fcf View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2022

  1. Configuration menu
    Copy the full SHA
    c8a8a28 View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2022

  1. Fix compilation

    bkchr committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    609e9a9 View commit details
    Browse the repository at this point in the history
  2. Fixes

    bkchr committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    86bd7b4 View commit details
    Browse the repository at this point in the history
  3. Remove warning

    bkchr committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    ccdacb9 View commit details
    Browse the repository at this point in the history