Skip to content

Commit

Permalink
Demote verbose log from info->debug (#109)
Browse files Browse the repository at this point in the history
* Demote verbose log from info->debug

* updated ci
  • Loading branch information
fulmicoton authored Jan 16, 2024
1 parent 3c1aa8b commit 99fbb38
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 19 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
- "scuttlebutt/**"
- "scuttlebutt-*/**"


env:
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: 1
Expand All @@ -21,9 +20,14 @@ jobs:
check:
name: Check (fmt, dependency check, clippy, test)
runs-on: ubuntu-latest
container: public.ecr.aws/l6o9a3f9/quickwit-builder:latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install rustup
run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none -y
- name: Setup stable Rust Toolchain
run: rustup show
- name: Setup nightly Rust Toolchain (for rustfmt)
run: rustup toolchain install nightly
- uses: actions/cache@v2
with:
path: |
Expand Down
4 changes: 2 additions & 2 deletions chitchat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repository = "https://github.com/quickwit-oss/chitchat"
anyhow = "1.0.51"
async-trait = "0.1"
bytes = "1"
itertools = "0.10.5"
itertools = "0.12"
rand = { version = "0.8", features = ["small_rng"] }
serde = { version = "1", features = ["derive"] }
tokio = { version = "1.28.0", features = ["net", "sync", "rt-multi-thread", "macros", "time"] }
Expand All @@ -22,7 +22,7 @@ tracing = "0.1"

[dev-dependencies]
assert-json-diff = "2"
mock_instant = "0.2.1"
mock_instant = "0.3"
tracing-subscriber = "0.3"

[features]
Expand Down
2 changes: 1 addition & 1 deletion chitchat/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async fn resolve_seed_host(seed_host: &str, seed_addrs: &mut HashSet<SocketAddr>
Ok(resolved_seed_addrs) => {
for seed_addr in resolved_seed_addrs {
if seed_addrs.insert(seed_addr) {
info!(seed_host=%seed_host, seed_addr=%seed_addr, "Resolved peer seed host.");
debug!(seed_host=%seed_host, seed_addr=%seed_addr, "Resolved peer seed host.");
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions chitchat/tests/cluster_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ pub fn find_available_tcp_port() -> anyhow::Result<u16> {

#[tokio::test]
async fn test_simple_simulation_insert() {
let _ = tracing_subscriber::fmt::try_init();
// let _ = tracing_subscriber::fmt::try_init();
let mut simulator = Simulator::new(Duration::from_millis(100), 10);
let chitchat_id_1 = create_chitchat_id("node-1");
let chitchat_id_2 = create_chitchat_id("node-2");
Expand Down Expand Up @@ -294,7 +294,7 @@ async fn test_simple_simulation_insert() {

#[tokio::test]
async fn test_simple_simulation_with_network_partition() {
let _ = tracing_subscriber::fmt::try_init();
// let _ = tracing_subscriber::fmt::try_init();
let mut simulator = Simulator::new(Duration::from_millis(100), 10);
let chitchat_id_1 = create_chitchat_id("node-1");
let chitchat_id_2 = create_chitchat_id("node-2");
Expand Down Expand Up @@ -336,7 +336,7 @@ async fn test_simple_simulation_with_network_partition() {

#[tokio::test]
async fn test_marked_for_deletion_gc_with_network_partition() {
let _ = tracing_subscriber::fmt::try_init();
// let _ = tracing_subscriber::fmt::try_init();
let mut simulator = Simulator::new(Duration::from_millis(100), 10);
let chitchat_id_1 = create_chitchat_id("node-1");
let chitchat_id_2 = create_chitchat_id("node-2");
Expand Down Expand Up @@ -458,7 +458,7 @@ async fn test_marked_for_deletion_gc_with_network_partition() {
// of nodes to 3 and keys to 1 or 2.
#[tokio::test(flavor = "multi_thread", worker_threads = 3)]
async fn test_simple_simulation_heavy_insert_delete() {
let _ = tracing_subscriber::fmt::try_init();
// let _ = tracing_subscriber::fmt::try_init();
let mut rng = thread_rng();
let mut simulator = Simulator::new(Duration::from_millis(100), 50);
let mut chitchat_ids = Vec::new();
Expand Down
38 changes: 29 additions & 9 deletions chitchat/tests/perf_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,42 +75,62 @@ async fn delay_before_detection_sample(num_nodes: usize, transport: &dyn Transpo

#[tokio::test]
async fn test_delay_before_dead_detection_10() {
let _ = tracing_subscriber::fmt::try_init();
// let _ = tracing_subscriber::fmt::try_init();
let transport = ChannelTransport::with_mtu(65_507);
let delay = delay_before_detection_sample(40, &transport).await;
assert!(delay < Duration::from_secs(4));
assert!(
delay < Duration::from_secs(10),
"Delay exceeded: {:?}",
delay
);
}

#[tokio::test]
async fn test_delay_before_dead_detection_20() {
let _ = tracing_subscriber::fmt::try_init();
// let _ = tracing_subscriber::fmt::try_init();
let transport = ChannelTransport::with_mtu(65_507);
let delay = delay_before_detection_sample(20, &transport).await;
assert!(delay < Duration::from_secs(4));
assert!(
delay < Duration::from_secs(10),
"Delay exceeded: {:?}",
delay
);
}

#[tokio::test]
async fn test_delay_before_dead_detection_40() {
let _ = tracing_subscriber::fmt::try_init();
// let _ = tracing_subscriber::fmt::try_init();
let transport = ChannelTransport::with_mtu(65_507);
let delay = delay_before_detection_sample(40, &transport).await;
assert!(delay < Duration::from_secs(5));
assert!(
delay < Duration::from_secs(10),
"Delay exceeded: {:?}",
delay
);
}

#[tokio::test]
async fn test_delay_before_dead_detection_100() {
let _ = tracing_subscriber::fmt::try_init();
// let _ = tracing_subscriber::fmt::try_init();
let transport = ChannelTransport::with_mtu(65_507);
let delay = delay_before_detection_sample(100, &transport).await;
assert!(delay < Duration::from_secs(5));
assert!(
delay < Duration::from_secs(10),
"Delay exceeded: {:?}",
delay
);
}

#[tokio::test]
async fn test_delay_before_dead_detection_100_faulty() {
let _ = tracing_subscriber::fmt::try_init();
let transport = ChannelTransport::with_mtu(65_507).drop_message(0.5f64);
let delay = delay_before_detection_sample(100, &*transport).await;
assert!(delay < Duration::from_secs(10));
assert!(
delay < Duration::from_secs(10),
"Delay exceeded: {:?}",
delay
);
}

async fn test_bandwidth_aux(num_nodes: usize) -> u64 {
Expand Down

0 comments on commit 99fbb38

Please sign in to comment.