http_protocol: allow announce/scrape url suffix; use in load test

This commit is contained in:
Joakim Frostegård 2022-04-03 19:17:57 +02:00
parent 05faa10f4b
commit b2a3c034b0
3 changed files with 15 additions and 8 deletions

View file

@ -18,6 +18,8 @@ pub struct Config {
/// opened as quickly as possible, which is useful when the tracker
/// does not keep connections alive.
pub connection_creation_interval_ms: u64,
/// Announce/scrape url suffix. Use `/my_token/` to get `/announce/my_token/`
pub url_suffix: String,
pub duration: usize,
pub torrents: TorrentConfig,
#[cfg(feature = "cpu-pinning")]
@ -56,6 +58,7 @@ impl Default for Config {
num_workers: 1,
num_connections: 128,
connection_creation_interval_ms: 10,
url_suffix: "".into(),
duration: 0,
torrents: TorrentConfig::default(),
#[cfg(feature = "cpu-pinning")]