mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 10:45:30 +00:00
aquatic: add Config struct, use in code
This commit is contained in:
parent
ad1fa5b833
commit
e4dfe2852c
6 changed files with 51 additions and 21 deletions
|
|
@ -6,6 +6,7 @@ use rand_distr::Pareto;
|
|||
|
||||
use aquatic::handlers::*;
|
||||
use aquatic::common::*;
|
||||
use aquatic::config::Config;
|
||||
use aquatic_bench::*;
|
||||
|
||||
use crate::common::*;
|
||||
|
|
@ -16,6 +17,7 @@ const ANNOUNCE_REQUESTS: usize = 1_000_000;
|
|||
|
||||
pub fn bench(
|
||||
state: &State,
|
||||
config: &Config,
|
||||
requests: Vec<(AnnounceRequest, SocketAddr)>,
|
||||
) -> (f64, f64) {
|
||||
let mut responses = Vec::with_capacity(ANNOUNCE_REQUESTS);
|
||||
|
|
@ -26,6 +28,7 @@ pub fn bench(
|
|||
|
||||
handle_announce_requests(
|
||||
&state,
|
||||
config,
|
||||
&mut responses,
|
||||
requests,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue