mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 18:25:30 +00:00
udo load test: config: rename "handler" to "requests", refactor
This commit is contained in:
parent
dd573cdb30
commit
411716e333
5 changed files with 47 additions and 45 deletions
|
|
@ -115,9 +115,9 @@ fn create_random_request(
|
|||
torrent_peer: &TorrentPeer,
|
||||
) -> Request {
|
||||
let weights = vec![
|
||||
config.handler.weight_announce as u32,
|
||||
config.handler.weight_connect as u32,
|
||||
config.handler.weight_scrape as u32,
|
||||
config.requests.weight_announce as u32,
|
||||
config.requests.weight_connect as u32,
|
||||
config.requests.weight_scrape as u32,
|
||||
];
|
||||
|
||||
let items = vec![
|
||||
|
|
@ -142,7 +142,7 @@ fn create_announce_request(
|
|||
transaction_id: TransactionId,
|
||||
) -> Request {
|
||||
let (event, bytes_left) = {
|
||||
if rng.gen_bool(config.handler.peer_seeder_probability) {
|
||||
if rng.gen_bool(config.requests.peer_seeder_probability) {
|
||||
(AnnounceEvent::Completed, NumberOfBytes(0))
|
||||
} else {
|
||||
(AnnounceEvent::Started, NumberOfBytes(50))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue