+ let mut out = Vec::new();
+
+ {
+ let stats = thread_arc.lock().unwrap();
+ if START_SHUTDOWN.load(Ordering::Relaxed) && stats.connection_count == 0 {
+ break;
+ }
+
+ out.write_all(b"\x1b[2J\x1b[;H\n").unwrap();
+ for line in stats.lines.iter() {
+ out.write_all(line.as_bytes()).unwrap();
+ out.write_all(b"\n").unwrap();
+ }
+
+ out.write_all(b"\nNode counts by status:\n").unwrap();
+ for i in 0..AddressState::get_count() {
+ out.write_all(format!("{:22}: {}\n", AddressState::from_num(i).unwrap().to_str(),
+ store.get_node_count(AddressState::from_num(i).unwrap())
+ ).as_bytes()).unwrap();
+ }
+ let generations = store.get_bloom_node_count();
+ out.write_all(b"Bloom filter generations contain:").unwrap();
+ for generation in &generations {
+ out.write_all(format!(" {}", generation).as_bytes()).unwrap();
+ }