Skip to main content

max / makenotwork

1.3 KB · 38 lines History Blame Raw
1 //! Load testing module: simulates concurrent virtual users against a shared
2 //! app instance to measure performance under contention.
3
4 mod blocking_probe;
5 mod config;
6 mod metrics;
7 mod mt_stub;
8 mod runner;
9 mod scenarios;
10
11 use config::LoadConfig;
12
13 #[tokio::test]
14 #[ignore = "load test; run manually"]
15 async fn load_test() {
16 let config = LoadConfig::from_env();
17 println!("\n=== Load Test Configuration ===");
18 println!(" Virtual users: {}", config.virtual_users);
19 println!(" Duration: {:?}", config.duration);
20 println!(" Ramp-up: {:?}", config.ramp_up);
21 println!(" Think time: {:?}", config.think_time);
22 println!(" DB max connections: {}", config.db_max_connections);
23 println!(" Scenario mix: {:?}", config.scenario_mix);
24 // The described set is the independent variable of every conversion
25 // measurement, so it is printed with the rest of the configuration rather
26 // than left in the shell history of whoever ran it. An empty line here means
27 // the run measured the Askama side.
28 println!(
29 " QUASI_SCREENS: {:?}",
30 std::env::var("QUASI_SCREENS").unwrap_or_default()
31 );
32 println!(" MT stub latency: {:?}", config.mt_latency);
33 println!(" MT memberships: {}", config.mt_memberships);
34 println!();
35
36 runner::run(config).await;
37 }
38