Replace type alias with newtype for UnprocesedPacketBatches

This commit is contained in:
Tao Zhu
2022-03-10 21:19:03 -06:00
committed by Tao Zhu
parent a3242b6b86
commit 8590911b0a
3 changed files with 50 additions and 6 deletions

View File

@ -37,7 +37,6 @@ use {
},
solana_streamer::socket::SocketAddrSpace,
std::{
collections::VecDeque,
sync::{atomic::Ordering, Arc, RwLock},
time::{Duration, Instant},
},
@ -80,7 +79,7 @@ fn bench_consume_buffered(bencher: &mut Bencher) {
let len = 4096;
let chunk_size = 1024;
let batches = to_packet_batches(&vec![tx; len], chunk_size);
let mut packet_batches = VecDeque::new();
let mut packet_batches = UnprocessedPacketBatches::new();
for batch in batches {
let batch_len = batch.packets.len();
packet_batches.push_back(DeserializedPacketBatch::new(