udp load test: display stats on announce responses per info hash

This commit is contained in:
Joakim Frostegård 2024-02-06 18:06:12 +01:00
parent 5cad19c12e
commit 84aa830e64
6 changed files with 100 additions and 17 deletions

View file

@ -1,5 +1,6 @@
use std::sync::{atomic::AtomicUsize, Arc};
use aquatic_common::IndexMap;
use aquatic_udp_protocol::*;
#[derive(Clone)]
@ -19,8 +20,13 @@ pub struct SharedStatistics {
}
pub struct Peer {
pub announce_info_hash_index: usize,
pub announce_info_hash: InfoHash,
pub announce_port: Port,
pub scrape_info_hash_indices: Box<[usize]>,
pub socket_index: u8,
}
pub enum StatisticsMessage {
ResponsesPerInfoHash(IndexMap<usize, u64>),
}