udp load test: use Gamma distribution for torrent selection

This commit is contained in:
Joakim Frostegård 2022-10-26 19:45:39 +02:00
parent 15f8d30518
commit 2b9db63984
5 changed files with 22 additions and 17 deletions

View file

@ -8,7 +8,7 @@ use std::time::Duration;
use mio::{net::UdpSocket, Events, Interest, Poll, Token};
use rand::Rng;
use rand::{prelude::SmallRng, thread_rng, SeedableRng};
use rand_distr::Pareto;
use rand_distr::Gamma;
use socket2::{Domain, Protocol, Socket, Type};
use aquatic_udp_protocol::*;
@ -21,7 +21,7 @@ const MAX_PACKET_SIZE: usize = 8192;
pub fn run_worker_thread(
state: LoadTestState,
pareto: Pareto<f64>,
pareto: Gamma<f64>,
config: &Config,
addr: SocketAddr,
) {