rust-libp2p icon indicating copy to clipboard operation
rust-libp2p copied to clipboard

fix(swarm): eliminating protocol cloning when nothing is happening

Open jakubDoka opened this issue 1 year ago • 31 comments

Description

Code keeps the API while eliminating repetitive protocol cloning when protocols did not change, If protocol changes occur, only then the protocols are cloned to a reused buffer from which they are borrowed for iteration. Following are benchmark results:

behaviour count iterations protocols timings change*
1 1000 10 27.798 µs 28.134 µs 28.493 µs -15.771% -14.523% -13.269%
1 1000 100 55.171 µs 55.578 µs 56.009 µs -51.831% -50.162% -48.437%
1 1000 1000 289.24 µs 290.99 µs 293.00 µs -61.748% -60.895% -60.054%
5 1000 2 34.000 µs 34.216 µs 34.457 µs -18.538% -16.231% -14.011%
5 1000 20 70.962 µs 71.428 µs 72.005 µs -40.501% -38.944% -37.309%
5 1000 200 426.17 µs 433.27 µs 442.60 µs -44.824% -42.663% -40.262%
10 1000 1 42.993 µs 44.382 µs 45.655 µs -18.839% -16.292% -13.584%
10 1000 10 94.022 µs 96.787 µs 99.321 µs -25.469% -23.572% -21.562%
10 1000 100 543.13 µs 554.91 µs 569.06 µs -43.781% -42.189% -40.568%
20 500 1 63.150 µs 64.846 µs 66.860 µs -9.5693% -6.1722% -2.6400%
20 500 10 212.21 µs 217.48 µs 222.64 µs -16.525% -14.234% -11.925%
20 500 100 1.6651 ms 1.7083 ms 1.7490 ms -27.704% -25.683% -23.618%

change*: 3da7d918d0d3c443f20d1813772af1ac152b68c7 is the baseline

Notes & open questions

Change checklist

  • [x] I have performed a self-review of my own code
  • [x] I have made corresponding changes to the documentation
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] A changelog entry has been made in the appropriate crates

jakubDoka avatar Dec 22 '23 21:12 jakubDoka

Also, did you manage to benchmark this somehow?

I ll try few benchmark strategies and will see. This should improve, so long as protocols don't change with each poll.

jakubDoka avatar Dec 25 '23 06:12 jakubDoka

https://github.com/libp2p/rust-libp2p/pull/5026/files#diff-03e30a287d6b2160a5ec3615cbe96268d6a778f6c96656982d78946c3cb04dcbR935-R966

hashset (bacb93ccdbd3347052b063ca7252943297c2be50)
num protocols | time
2 564.58248ms
4 828.611434ms
10 1.632474501s
20 3.054404475s

vec (d8417ea274c8a7a15f4965bc3d6e18a5c7f27791)
num protocols | time
2 320.806934ms
4 420.014621ms
10 1.001984668s
20 2.789481624s

since we always insert all of the protocols to the hashset on each poll, it hinders the performance

jakubDoka avatar Dec 25 '23 07:12 jakubDoka

I am now using hashmap with booleans to compute the diff, so no need to collect the protocols.

hashmap (98b2eb1ca01ac0b02950d4871c68408e7093fa64)
num protocols | time
2 370.042196ms
4 497.035778ms
10 836.521122ms
20 1.435295081s

jakubDoka avatar Dec 25 '23 08:12 jakubDoka

finally this is results of benchmark on old code:

old code (b6bb02b9305b56ed2a4e2ff44b510fa84d8d7401)
num protocols | time
2 728.680186ms
4 1.292526676s
10 3.098013194s
20 6.180503327s

jakubDoka avatar Dec 25 '23 08:12 jakubDoka

@thomaseizinger I am curios what you think about the way I benchmark it

jakubDoka avatar Dec 25 '23 08:12 jakubDoka

I realized am testing with very short protocol names so here is a little change

old code (b6bb02b9305b56ed2a4e2ff44b510fa84d8d7401)
2 770.244421ms
4 1.382793447s
10 3.299081332s
20 6.912836208s

this pr (c271dbd76cb2013f1f976c2698be9d2c185e21f4)
2 402.820567ms
4 580.694491ms
10 956.659777ms
20 1.577939021s

jakubDoka avatar Dec 25 '23 09:12 jakubDoka

@thomaseizinger, hey, did I miss something that still needs to be done?

jakubDoka avatar Jan 09 '24 18:01 jakubDoka

@thomaseizinger, hey, did I miss something that still needs to be done?

Sorry for the delay. I am on low availability until mid-Jan. Will give this a review after! :)

thomaseizinger avatar Jan 10 '24 13:01 thomaseizinger

@thomaseizinger sorry, I thought criterion was not needed since you mentioned I should just comment out the benchmark, making the criterion benchmark is kind of hard since it requires me to make things public. Should I make a #[doc(hidden)] mod __benchmark_exports and expose the API from there?

jakubDoka avatar Jan 17 '24 18:01 jakubDoka

@thomaseizinger sorry, I thought criterion was not needed since you mentioned I should just comment out the benchmark, making the criterion benchmark is kind of hard since it requires me to make things public. Should I make a #[doc(hidden)] mod __benchmark_exports and expose the API from there?

Yeah sorry if that wasn't clear. Is there no way we can embed benchmarks like we can do with tests?

If not then I am fine with doc(hidden) yes.

thomaseizinger avatar Jan 21 '24 21:01 thomaseizinger

Ideally we benchmark the following:

  1. One protocols handler listening on many protocols (i.e. returning one large iterator).
  2. Many handlers composed using ConnectionHandlerSelect, all returning a small number of protocols ( < 5). This should be the much more likely case in production environments.

If possible, I'd like us to bench this using the ConnectionHandler API and not the internal functions used. That API is more stable and also what our users will use.

Sorry for the overall delay, I am pretty busy right now but I should get to review the latest version some time this week.

thomaseizinger avatar Jan 21 '24 21:01 thomaseizinger

FYI the new kid on the block of benchmarking doesn't need re-exports: https://nikolaivazquez.com/blog/divan/

thomaseizinger avatar Apr 05 '24 11:04 thomaseizinger

Hey, @thomaseizinger, sorry for the delay, I was putting this off for a bit too long, here are my findings with criterion:

one_behavior_many_protocols_10000_10000
                        time:   [371.18 ns 400.71 ns 432.65 ns]
                        change: [+96.608% +111.34% +128.34%] (p = 0.00 < 0.05)
                        Performance has regressed.

This is the result of reverting optimizations with 10000 protocols on one behavior (compared to the run with changes in this PR), In this case, a lot more code is being executed than just the connection handler which might be the reason the difference is smaller. Please review the benchmarking code, I am not 100% confident this is a good measurement. I'll also try making Tokio run in single-threaded mode if that makes a difference.

jakubDoka avatar Apr 05 '24 13:04 jakubDoka

does memory transport deadlock on single-threaded mode?

jakubDoka avatar Apr 05 '24 13:04 jakubDoka

welp, I can't find any reasonable difference now, I guess the protocol drops are not that significant when all the other code is run as well, so I was most likely measuring with perf incorrectly

jakubDoka avatar Apr 05 '24 14:04 jakubDoka

Okay, @thomaseizinger, so, I had a bug in my benchmark, where it did the computation only in the first iteration, that explains why nothing made sense. Here are the results relative to the optimized version with code actually running:

one_behavior_many_protocols_10_10000
                        time:   [5.1501 ns 5.2009 ns 5.2672 ns]
                        change: [+21.023% +45.565% +78.378%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 13 outliers among 100 measurements (13.00%)
  5 (5.00%) high mild
  8 (8.00%) high severe

one_behavior_many_protocols_100_10000
                        time:   [38.781 ns 41.020 ns 43.979 ns]
                        change: [+933.16% +1537.7% +2470.1%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 12 outliers among 100 measurements (12.00%)
  4 (4.00%) high mild
  8 (8.00%) high severe

Benchmarking one_behavior_many_protocols_1000_10000: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 24.7s, or reduce sample count to 20.
one_behavior_many_protocols_1000_10000
                        time:   [1.1929 s 1.1935 s 1.1941 s]
                        change: [+3361177% +5067496% +8037679%] (p = 0.00 < 0.05)
                        Performance has regressed.

The scaling is crazy, I am also not sure if I still have bug in there.

I will make the many behaviours few protocols too.

jakubDoka avatar Apr 09 '24 18:04 jakubDoka

Here are the results I measured when backporting the benchmark to the old code (relative to the code in this PR).

behaviour count poll count protocols per behaviour - criterion timings - - relative to optimized -
1 10000 10 5.0929 ns 5.1446 ns 5.2114 ns +12.161% +35.315% +67.914%
1 10000 100 73.980 ns 78.618 ns 84.704 ns +1657.4% +2820.0% +4446.2%
1 10000 1000 1.2187 s 1.2346 s 1.2520 s +3487517% +5188829% +8083610%
5 10000 2 5.7967 ns 5.8683 ns 5.9594 ns -3.3394% +24.190% +59.359%
5 10000 20 73.980 ns 78.618 ns 84.704 ns +12077% +20886% +36318%
5 10000 200 1.4295 s 1.4539 s 1.4807 s +1717.6% +1757.6% +1801.1%
10 10000 1 8.4749 ns 8.6357 ns 8.8395 ns +20.345% +57.598% +113.58%
10 10000 10 22.639 µs 24.181 µs 26.200 µs +119201% +216609% +393443%
10 10000 100 1.5294 s 1.5624 s 1.5990 s +502.42% +518.37% +534.22%
20 5000 1 12.590 ns 12.812 ns 13.102 ns +22.571% +63.701% +124.43%
20 5000 10 215.98 µs 230.96 µs 249.94 µs +575791% +1038332% +1854409%
20 5000 100 1.7545 s 1.7898 s 1.8277 s +146.45% +152.05% +158.10%

I am still suspicious of some of the gigantic performance differences, but this may be due to the optimized version avoiding protocol cloning.

Full Results
Benchmarking connection_handler::PollerBehaviour::bench().poll_count(10000).protocols_per_behaviour(10)
Benchmarking connection_handler::PollerBehaviour::bench().poll_count(10000).protocols_per_behaviour(10): Warming up for 3.0000 s
Benchmarking connection_handler::PollerBehaviour::bench().poll_count(10000).protocols_per_behaviour(10): Collecting 100 samples in estimated 5.0000 s (1.1B iterations)
Benchmarking connection_handler::PollerBehaviour::bench().poll_count(10000).protocols_per_behaviour(10): Analyzing
connection_handler::PollerBehaviour::bench().poll_count(10000).protocols_per_behaviour(10)
                        time:   [5.0929 ns 5.1446 ns 5.2114 ns]
                        change: [+12.161% +35.315% +67.914%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 12 outliers among 100 measurements (12.00%)
  4 (4.00%) high mild
  8 (8.00%) high severe

Benchmarking connection_handler::PollerBehaviour::bench().poll_count(10000).protocols_per_behaviour(100)
Benchmarking connection_handler::PollerBehaviour::bench().poll_count(10000).protocols_per_behaviour(100): Warming up for 3.0000 s
Benchmarking connection_handler::PollerBehaviour::bench().poll_count(10000).protocols_per_behaviour(100): Collecting 100 samples in estimated 5.0002 s (110M iterations)
Benchmarking connection_handler::PollerBehaviour::bench().poll_count(10000).protocols_per_behaviour(100): Analyzing
connection_handler::PollerBehaviour::bench().poll_count(10000).protocols_per_behaviour(100)
                        time:   [73.980 ns 78.618 ns 84.704 ns]
                        change: [+1657.4% +2820.0% +4446.2%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 13 outliers among 100 measurements (13.00%)
  5 (5.00%) high mild
  8 (8.00%) high severe

Benchmarking connection_handler::PollerBehaviour::bench().poll_count(10000).protocols_per_behaviour(1000)
Benchmarking connection_handler::PollerBehaviour::bench().poll_count(10000).protocols_per_behaviour(1000): Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 24.7s, or reduce sample count to 20.
Benchmarking connection_handler::PollerBehaviour::bench().poll_count(10000).protocols_per_behaviour(1000): Collecting 100 samples in estimated 24.707 s (100 iterations)
Benchmarking connection_handler::PollerBehaviour::bench().poll_count(10000).protocols_per_behaviour(1000): Analyzing
connection_handler::PollerBehaviour::bench().poll_count(10000).protocols_per_behaviour(1000)
                        time:   [1.2187 s 1.2346 s 1.2520 s]
                        change: [+3487517% +5188829% +8083610%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 15 outliers among 100 measurements (15.00%)
  3 (3.00%) high mild
  12 (12.00%) high severe

Benchmarking connection_handler::PollerBehaviour5::bench().poll_count(10000).protocols_per_behaviour(2)
Benchmarking connection_handler::PollerBehaviour5::bench().poll_count(10000).protocols_per_behaviour(2): Warming up for 3.0000 s
Benchmarking connection_handler::PollerBehaviour5::bench().poll_count(10000).protocols_per_behaviour(2): Collecting 100 samples in estimated 5.0000 s (892M iterations)
Benchmarking connection_handler::PollerBehaviour5::bench().poll_count(10000).protocols_per_behaviour(2): Analyzing
connection_handler::PollerBehaviour5::bench().poll_count(10000).protocols_per_behaviour(2)
                        time:   [5.7967 ns 5.8683 ns 5.9594 ns]
                        change: [-3.3394% +24.190% +59.359%] (p = 0.11 > 0.05)
                        No change in performance detected.
Found 13 outliers among 100 measurements (13.00%)
  5 (5.00%) high mild
  8 (8.00%) high severe

Benchmarking connection_handler::PollerBehaviour5::bench().poll_count(10000).protocols_per_behaviour(20)
Benchmarking connection_handler::PollerBehaviour5::bench().poll_count(10000).protocols_per_behaviour(20): Warming up for 3.0000 s
Benchmarking connection_handler::PollerBehaviour5::bench().poll_count(10000).protocols_per_behaviour(20): Collecting 100 samples in estimated 5.0019 s (7.0M iterations)
Benchmarking connection_handler::PollerBehaviour5::bench().poll_count(10000).protocols_per_behaviour(20): Analyzing
connection_handler::PollerBehaviour5::bench().poll_count(10000).protocols_per_behaviour(20)
                        time:   [1.2403 µs 1.3337 µs 1.4536 µs]
                        change: [+12077% +20886% +36318%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 13 outliers among 100 measurements (13.00%)
  5 (5.00%) high mild
  8 (8.00%) high severe

Benchmarking connection_handler::PollerBehaviour5::bench().poll_count(10000).protocols_per_behaviour(200)
Benchmarking connection_handler::PollerBehaviour5::bench().poll_count(10000).protocols_per_behaviour(200): Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 26.7s, or reduce sample count to 10.
Benchmarking connection_handler::PollerBehaviour5::bench().poll_count(10000).protocols_per_behaviour(200): Collecting 100 samples in estimated 26.664 s (100 iterations)
Benchmarking connection_handler::PollerBehaviour5::bench().poll_count(10000).protocols_per_behaviour(200): Analyzing
connection_handler::PollerBehaviour5::bench().poll_count(10000).protocols_per_behaviour(200)
                        time:   [1.4295 s 1.4539 s 1.4807 s]
                        change: [+1717.6% +1757.6% +1801.1%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 26 outliers among 100 measurements (26.00%)
  14 (14.00%) low mild
  5 (5.00%) high mild
  7 (7.00%) high severe

Benchmarking connection_handler::PollerBehaviour10::bench().poll_count(10000).protocols_per_behaviour(1)
Benchmarking connection_handler::PollerBehaviour10::bench().poll_count(10000).protocols_per_behaviour(1): Warming up for 3.0000 s
Benchmarking connection_handler::PollerBehaviour10::bench().poll_count(10000).protocols_per_behaviour(1): Collecting 100 samples in estimated 5.0000 s (579M iterations)
Benchmarking connection_handler::PollerBehaviour10::bench().poll_count(10000).protocols_per_behaviour(1): Analyzing
connection_handler::PollerBehaviour10::bench().poll_count(10000).protocols_per_behaviour(1)
                        time:   [8.4749 ns 8.6357 ns 8.8395 ns]
                        change: [+20.345% +57.598% +113.58%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 11 outliers among 100 measurements (11.00%)
  4 (4.00%) high mild
  7 (7.00%) high severe

Benchmarking connection_handler::PollerBehaviour10::bench().poll_count(10000).protocols_per_behaviour(10)
Benchmarking connection_handler::PollerBehaviour10::bench().poll_count(10000).protocols_per_behaviour(10): Warming up for 3.0000 s
Benchmarking connection_handler::PollerBehaviour10::bench().poll_count(10000).protocols_per_behaviour(10): Collecting 100 samples in estimated 5.0517 s (424k iterations)
Benchmarking connection_handler::PollerBehaviour10::bench().poll_count(10000).protocols_per_behaviour(10): Analyzing
connection_handler::PollerBehaviour10::bench().poll_count(10000).protocols_per_behaviour(10)
                        time:   [22.639 µs 24.181 µs 26.200 µs]
                        change: [+119201% +216609% +393443%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 13 outliers among 100 measurements (13.00%)
  5 (5.00%) high mild
  8 (8.00%) high severe

Benchmarking connection_handler::PollerBehaviour10::bench().poll_count(10000).protocols_per_behaviour(100)
Benchmarking connection_handler::PollerBehaviour10::bench().poll_count(10000).protocols_per_behaviour(100): Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 53.6s, or reduce sample count to 10.
Benchmarking connection_handler::PollerBehaviour10::bench().poll_count(10000).protocols_per_behaviour(100): Collecting 100 samples in estimated 53.614 s (100 iterations)
Benchmarking connection_handler::PollerBehaviour10::bench().poll_count(10000).protocols_per_behaviour(100): Analyzing
connection_handler::PollerBehaviour10::bench().poll_count(10000).protocols_per_behaviour(100)
                        time:   [1.5294 s 1.5624 s 1.5990 s]
                        change: [+502.42% +518.37% +534.22%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 16 outliers among 100 measurements (16.00%)
  3 (3.00%) high mild
  13 (13.00%) high severe

Benchmarking connection_handler::PollerBehaviour20::bench().poll_count(5000).protocols_per_behaviour(1)
Benchmarking connection_handler::PollerBehaviour20::bench().poll_count(5000).protocols_per_behaviour(1): Warming up for 3.0000 s
Benchmarking connection_handler::PollerBehaviour20::bench().poll_count(5000).protocols_per_behaviour(1): Collecting 100 samples in estimated 5.0000 s (358M iterations)
Benchmarking connection_handler::PollerBehaviour20::bench().poll_count(5000).protocols_per_behaviour(1): Analyzing
connection_handler::PollerBehaviour20::bench().poll_count(5000).protocols_per_behaviour(1)
                        time:   [12.590 ns 12.812 ns 13.102 ns]
                        change: [+22.571% +63.701% +124.43%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 12 outliers among 100 measurements (12.00%)
  4 (4.00%) high mild
  8 (8.00%) high severe

Benchmarking connection_handler::PollerBehaviour20::bench().poll_count(5000).protocols_per_behaviour(10)
Benchmarking connection_handler::PollerBehaviour20::bench().poll_count(5000).protocols_per_behaviour(10): Warming up for 3.0000 s
Benchmarking connection_handler::PollerBehaviour20::bench().poll_count(5000).protocols_per_behaviour(10): Collecting 100 samples in estimated 5.0968 s (56k iterations)
Benchmarking connection_handler::PollerBehaviour20::bench().poll_count(5000).protocols_per_behaviour(10): Analyzing
connection_handler::PollerBehaviour20::bench().poll_count(5000).protocols_per_behaviour(10)
                        time:   [215.98 µs 230.96 µs 249.94 µs]
                        change: [+575791% +1038332% +1854409%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 9 outliers among 100 measurements (9.00%)
  3 (3.00%) high mild
  6 (6.00%) high severe

Benchmarking connection_handler::PollerBehaviour20::bench().poll_count(5000).protocols_per_behaviour(100)
Benchmarking connection_handler::PollerBehaviour20::bench().poll_count(5000).protocols_per_behaviour(100): Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 58.8s, or reduce sample count to 10.
Benchmarking connection_handler::PollerBehaviour20::bench().poll_count(5000).protocols_per_behaviour(100): Collecting 100 samples in estimated 58.800 s (100 iterations)
Benchmarking connection_handler::PollerBehaviour20::bench().poll_count(5000).protocols_per_behaviour(100): Analyzing
connection_handler::PollerBehaviour20::bench().poll_count(5000).protocols_per_behaviour(100)
                        time:   [1.7545 s 1.7898 s 1.8277 s]
                        change: [+146.45% +152.05% +158.10%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 20 outliers among 100 measurements (20.00%)
  5 (5.00%) high mild
  15 (15.00%) high severe

jakubDoka avatar Apr 10 '24 08:04 jakubDoka

Benchmark results with applied modifications. Numbers are now more reasonable since both implementations need to do the initial protocol cloning.

behaviours iters protocols per behaviour - time-per-iter - - relation to optimized version - verdict
1 10000 10 7.6035 ns 7.7618 ns 7.9634 ns +46.884% +101.01% +188.79% Performance has regressed.
1 10000 100 17.956 µs 19.036 µs 20.382 µs +189586% +312058% +514568% Performance has regressed.
1 10000 1000 1.5639 s 1.6051 s 1.6499 s +7414.9% +7652.0% +7905.9% Performance has regressed.
5 10000 2 9.0094 ns 9.2876 ns 9.5575 ns +3.7805% +48.109% +110.34% Performance has regressed.
5 10000 20 57.170 µs 61.703 µs 67.540 µs +172759% +313410% +554174% Performance has regressed.
5 10000 200 1.7835 s 1.8163 s 1.8515 s +111.89% +117.60% +123.46% Performance has regressed.
10 10000 1 12.783 ns 13.132 ns 13.534 ns -23.336% +22.887% +90.767% No change in performance detected.
10 10000 10 28.961 µs 31.101 µs 33.781 µs +549.87% +1095.6% +2066.8% Performance has regressed.
10 10000 100 1.8011 s 1.8359 s 1.8729 s +47.806% +51.715% +56.117% Performance has regressed.
20 5000 1 15.085 ns 15.527 ns 16.108 ns -40.576% -7.7926% +42.042% No change in performance detected.
20 5000 10 470.49 µs 507.08 µs 553.35 µs +93.120% +249.05% +540.40% Performance has regressed.
20 5000 100 1.9931 s 2.0245 s 2.0578 s +9.9884% +12.365% +14.826% Performance has regressed.

jakubDoka avatar Apr 11 '24 14:04 jakubDoka

I am currently travelling but will look at this in 2ish weeks time.

thomaseizinger avatar May 05 '24 00:05 thomaseizinger

This pull request has merge conflicts. Could you please resolve them @jakubDoka? 🙏

mergify[bot] avatar May 18 '24 11:05 mergify[bot]

Okay, do we need changelogs for this? Should I also squish the commits?

jakubDoka avatar May 20 '24 12:05 jakubDoka

Okay, do we need changelogs for this? Should I also squish the commits?

Yes, please write a changelog entry. Also libp2p-swarm needs to be bumped to 0.44.3. No need for squashing commits, we squash-merge all PRs! :)

thomaseizinger avatar May 22 '24 23:05 thomaseizinger

@thomaseizinger, sorry for the delay I made the changes

jakubDoka avatar Jun 01 '24 20:06 jakubDoka

@jakubDoka Can you attend the CI failures? Thanks!

thomaseizinger avatar Jun 04 '24 08:06 thomaseizinger

@thomaseizinger How can I troubleshoot the workflows? I focused on fixing one and now I cant find the other one. Is there an easy way to run them locally?

jakubDoka avatar Jun 05 '24 14:06 jakubDoka

@thomaseizinger How can I troubleshoot the workflows? I focused on fixing one and now I cant find the other one. Is there an easy way to run them locally?

I allowed them. Unfortunately, GitHub blocks CI from new contributors. Easiest fix is either running the same steps locally (it is usually just tests or other commands) or making a tiny docs change that we can merge immediately so you can iterate on CI here without me having to approve them constantly.

You can also look back at previous CI runs by clicking on the red X next to the commit.

thomaseizinger avatar Jun 05 '24 21:06 thomaseizinger

@thomaseizinger the https://github.com/libp2p/rust-libp2p/actions/runs/9389775529/job/25864640742?pr=5026 is failing but I most likely did not cause it since swarm is not even imported, it might be the cargo lock update though

jakubDoka avatar Jun 05 '24 23:06 jakubDoka

that was the problem, scarry

jakubDoka avatar Jun 05 '24 23:06 jakubDoka

This looks great! Thank you very much.

We have some automation that will use the text in ## Description in your PR as the commit message for the squash-merged commit.

Could you include some benchmark results in there? Just the criterion run is good with current master as the baseline?

added

jakubDoka avatar Jun 06 '24 00:06 jakubDoka

@jxs All yours from here.

thomaseizinger avatar Jun 06 '24 03:06 thomaseizinger