ci: add more debug info with tuning test

This commit is contained in:
Carl Lerche 2023-06-05 12:38:07 -07:00
parent 15712018da
commit 497dee6ec8
No known key found for this signature in database
GPG Key ID: FC5ADF3A4B2E5977
2 changed files with 14 additions and 3 deletions

View File

@ -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

View File

@ -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 {