mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
udp load test: use Gamma distribution for torrent selection
This commit is contained in:
parent
15f8d30518
commit
2b9db63984
5 changed files with 22 additions and 17 deletions
|
|
@ -6,7 +6,7 @@ use std::time::{Duration, Instant};
|
|||
|
||||
#[cfg(feature = "cpu-pinning")]
|
||||
use aquatic_common::cpu_pinning::{pin_current_if_configured_to, WorkerIndex};
|
||||
use rand_distr::Pareto;
|
||||
use rand_distr::Gamma;
|
||||
|
||||
mod common;
|
||||
mod config;
|
||||
|
|
@ -58,7 +58,11 @@ fn run(config: Config) -> ::anyhow::Result<()> {
|
|||
statistics: Arc::new(Statistics::default()),
|
||||
};
|
||||
|
||||
let pareto = Pareto::new(1.0, config.requests.torrent_selection_pareto_shape).unwrap();
|
||||
let pareto = Gamma::new(
|
||||
config.requests.torrent_gamma_shape,
|
||||
config.requests.torrent_gamma_scale,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
// Start workers
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue