Add limit and shrink policy for recycler (#15320)

This commit is contained in:
carllin
2021-02-24 00:15:58 -08:00
committed by GitHub
parent 2f46da346d
commit c2e8814dce
24 changed files with 515 additions and 127 deletions

View File

@ -75,7 +75,7 @@ fn main() -> Result<()> {
let mut read_channels = Vec::new();
let mut read_threads = Vec::new();
let recycler = PacketsRecycler::default();
let recycler = PacketsRecycler::new_without_limit("bench-streamer-recycler-shrink-stats");
for _ in 0..num_sockets {
let read = solana_net_utils::bind_to(ip_addr, port, false).unwrap();
read.set_read_timeout(Some(Duration::new(1, 0))).unwrap();