Closed ethercflow closed 2 years ago
@BusyJay @sticnarf PTAL, thanks!
I found that the CI failed caused by thread 'pool::tests::test_basic' panicked at 'called `Result::unwrap()` on an `Err` value: Timeout', src/pool/tests.rs:38:67,
but I cannot reproduce it locally. Is this just because CI is too slower?
I found that the CI failed caused by
thread 'pool::tests::test_basic' panicked at 'called `Result::unwrap()` on an `Err` value: Timeout', src/pool/tests.rs:38:67,
but I cannot reproduce it locally. Is this just because CI is too slower?
I don't know. I think the 1 seconds timeout is large enough. I cannot reproduce the failure locally, either.
The idea generally looks good. Is there any benchmark result about this change? It looks it adds a few checks to paths that are frequently called.
Not yet, will follow up
The idea generally looks good. Is there any benchmark result about this change? It looks it adds a few checks to paths that are frequently called.
Not yet, will follow up
The comparison result of bench is as follows, base
represents the current master branch, and scale
represents my modification:
I found that the CI failed caused by
thread 'pool::tests::test_basic' panicked at 'called `Result::unwrap()` on an `Err` value: Timeout', src/pool/tests.rs:38:67,
but I cannot reproduce it locally. Is this just because CI is too slower?I don't know. I think the 1 seconds timeout is large enough. I cannot reproduce the failure locally, either.
I found the reason. The setting of the default value of core_thread_count
is problematic. If it is not set, it should be equal to the max_thread_count
not cpu_nr
.
taskset -a -c 1 cargo bench --all - --test
can reproduce.
This Feature Request description and Technical proposal can be seen here: #60
Tests that have been run, the test env is
Testcases:
cargo bench --all -- --test
in a shell loop, will exist if failed: passed with 26 success, 4 ignored, tested 50+ timesRan
cargo bench --all --all-features -- --test
in a shell loop, will exist if failed: passed with 30(all) success. tested 50+ timesI wrote a system testcase: test-yatp, and had ran for a few hours.
The test logic is simple:
While running, execute the
pidstat -G yatp -t 1
command to observe that the number of threads running is in line with expectations:It does make sense?
Signed-off-by: Wenbo Zhang ethercflow@gmail.com