mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
ci: add more debug info with tuning test
This commit is contained in:
parent
15712018da
commit
497dee6ec8
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@ -8,7 +8,6 @@ name: CI
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: -Dwarnings
|
RUSTFLAGS: -Dwarnings
|
||||||
RUST_BACKTRACE: 1
|
|
||||||
# Change to specific Rust release to pin
|
# Change to specific Rust release to pin
|
||||||
rust_stable: stable
|
rust_stable: stable
|
||||||
rust_nightly: nightly-2023-05-18
|
rust_nightly: nightly-2023-05-18
|
||||||
|
@ -628,9 +628,15 @@ fn test_tuning() {
|
|||||||
|
|
||||||
// Now, hammer the injection queue until the interval drops.
|
// Now, hammer the injection queue until the interval drops.
|
||||||
let mut n = 0;
|
let mut n = 0;
|
||||||
|
let mut i = 0;
|
||||||
loop {
|
loop {
|
||||||
|
i += 1;
|
||||||
let curr = interval.load(Relaxed);
|
let curr = interval.load(Relaxed);
|
||||||
|
|
||||||
|
if i % 10_000 == 9_999 {
|
||||||
|
println!("interval={curr}");
|
||||||
|
}
|
||||||
|
|
||||||
if curr <= 8 {
|
if curr <= 8 {
|
||||||
n += 1;
|
n += 1;
|
||||||
} else {
|
} else {
|
||||||
@ -652,9 +658,9 @@ fn test_tuning() {
|
|||||||
let prev = counter.swap(0, Relaxed);
|
let prev = counter.swap(0, Relaxed);
|
||||||
interval.store(prev, Relaxed);
|
interval.store(prev, Relaxed);
|
||||||
});
|
});
|
||||||
|
|
||||||
std::thread::yield_now();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::thread::yield_now();
|
||||||
}
|
}
|
||||||
|
|
||||||
flag.store(false, Relaxed);
|
flag.store(false, Relaxed);
|
||||||
@ -680,9 +686,15 @@ fn test_tuning() {
|
|||||||
|
|
||||||
// Now, hammer the injection queue until the interval reaches the expected range.
|
// Now, hammer the injection queue until the interval reaches the expected range.
|
||||||
let mut n = 0;
|
let mut n = 0;
|
||||||
|
let mut i = 0;
|
||||||
loop {
|
loop {
|
||||||
|
i += 1;
|
||||||
let curr = interval.load(Relaxed);
|
let curr = interval.load(Relaxed);
|
||||||
|
|
||||||
|
if i % 10_000 == 9_999 {
|
||||||
|
println!("interval(2)={curr}");
|
||||||
|
}
|
||||||
|
|
||||||
if curr <= 1_000 && curr > 32 {
|
if curr <= 1_000 && curr > 32 {
|
||||||
n += 1;
|
n += 1;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user