1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! ============================================================================
//! closed_loop_users.rs — N virtual users, each looping
//! ============================================================================
//! Category : Utility Tool
//! Component : core::Config, runner::engine::run_users
//! Prerequisites: none (starts the built-in target itself)
//! Execution : cargo run --release --example closed_loop_users
//! Metrics : throughput, per-user think time, service-time percentiles
//!
//! Closed loop is bounded by `num_users` and nothing else. Each user sends a
//! request, waits out `think_time_ms`, and repeats — so concurrency rises and
//! falls with how fast the target responds. That is the point: it models a
//! population of users rather than a request rate.
//!
//! Note that `max_concurrency` is *not* a second control here. It is documented
//! as an open-loop bound, and Users mode deliberately has exactly one
//! concurrency control. Setting it does nothing in this mode.
//! ============================================================================
use Config;
use Mode;
use ;
async