mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 09:45:31 +00:00
udp load test: rename config key peer_histogram to extra_statistics
This commit is contained in:
parent
c97a3a7996
commit
b16ab82699
3 changed files with 6 additions and 6 deletions
|
|
@ -25,8 +25,8 @@ pub struct Config {
|
|||
///
|
||||
/// 0 = include whole run
|
||||
pub summarize_last: usize,
|
||||
/// Display data on number of peers per info hash
|
||||
pub peer_histogram: bool,
|
||||
/// Display extra statistics
|
||||
pub extra_statistics: bool,
|
||||
pub network: NetworkConfig,
|
||||
pub requests: RequestConfig,
|
||||
#[cfg(feature = "cpu-pinning")]
|
||||
|
|
@ -41,7 +41,7 @@ impl Default for Config {
|
|||
workers: 1,
|
||||
duration: 0,
|
||||
summarize_last: 0,
|
||||
peer_histogram: true,
|
||||
extra_statistics: true,
|
||||
network: NetworkConfig::default(),
|
||||
requests: RequestConfig::default(),
|
||||
#[cfg(feature = "cpu-pinning")]
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ fn monitor_statistics(
|
|||
thread::sleep(Duration::from_secs(INTERVAL));
|
||||
|
||||
let mut opt_responses_per_info_hash: Option<IndexMap<usize, u64>> =
|
||||
config.peer_histogram.then_some(Default::default());
|
||||
config.extra_statistics.then_some(Default::default());
|
||||
|
||||
for message in statistics_receiver.try_iter() {
|
||||
match message {
|
||||
|
|
@ -239,7 +239,7 @@ fn create_peers(config: &Config, info_hash_dist: &InfoHashDist) -> Vec<Box<[Peer
|
|||
let mut rng = SmallRng::seed_from_u64(0xc3a58be617b3acce);
|
||||
|
||||
let mut opt_peers_per_info_hash: Option<IndexMap<usize, u64>> =
|
||||
config.peer_histogram.then_some(IndexMap::default());
|
||||
config.extra_statistics.then_some(IndexMap::default());
|
||||
|
||||
let mut all_peers = repeat_with(|| {
|
||||
let num_scrape_indices = rng.gen_range(1..config.requests.scrape_max_torrents + 1);
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ impl Worker {
|
|||
.response_peers
|
||||
.fetch_add(self.statistics.response_peers, Ordering::Relaxed);
|
||||
|
||||
if self.config.peer_histogram {
|
||||
if self.config.extra_statistics {
|
||||
let message = StatisticsMessage::ResponsesPerInfoHash(
|
||||
self.announce_responses_per_info_hash.split_off(0),
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue