diff --git a/README.md b/README.md index b06b0d3..b5446ea 100644 --- a/README.md +++ b/README.md @@ -194,9 +194,6 @@ To load test `aquatic_ws`, start it and then run: ./scripts/run-load-test-ws.sh ``` -To achieve high throughput, it is currently necessary to sharply reduce the -poll timeout setting in the tracker, and reduce it somewhat in the load tester. - ### aquatic_http_load_test To load test `aquatic_http`, start it and then run: diff --git a/aquatic_ws_load_test/src/config.rs b/aquatic_ws_load_test/src/config.rs index 9ebd547..809ed9a 100644 --- a/aquatic_ws_load_test/src/config.rs +++ b/aquatic_ws_load_test/src/config.rs @@ -30,6 +30,7 @@ pub struct NetworkConfig { #[derive(Clone, Debug, Serialize, Deserialize)] #[serde(default)] pub struct TorrentConfig { + pub offers_per_request: usize, pub number_of_torrents: usize, /// Pareto shape /// @@ -73,6 +74,7 @@ impl Default for NetworkConfig { impl Default for TorrentConfig { fn default() -> Self { Self { + offers_per_request: 10, number_of_torrents: 10_000, peer_seeder_probability: 0.25, torrent_selection_pareto_shape: 2.0, diff --git a/aquatic_ws_load_test/src/utils.rs b/aquatic_ws_load_test/src/utils.rs index 74aa0ef..eac6ff6 100644 --- a/aquatic_ws_load_test/src/utils.rs +++ b/aquatic_ws_load_test/src/utils.rs @@ -60,12 +60,12 @@ fn create_announce_request( }; let info_hash_index = select_info_hash_index(config, &state, rng); - - const NUM_OFFERS: usize = 2; - let mut offers = Vec::with_capacity(NUM_OFFERS); + let mut offers = Vec::with_capacity( + config.torrents.offers_per_request + ); - for _ in 0..NUM_OFFERS { + for _ in 0..config.torrents.offers_per_request { offers.push(AnnounceRequestOffer { offer_id: OfferId(rng.gen()), offer: JsonValue(::serde_json::json!(