|
@@ -11,6 +11,11 @@ use std::collections::HashSet;
|
|
use std::thread;
|
|
use std::thread;
|
|
use std::time::{Duration, Instant};
|
|
use std::time::{Duration, Instant};
|
|
|
|
|
|
|
|
+#[cfg(feature = "fast")]
|
|
|
|
+const USERS: usize = 100;
|
|
|
|
+#[cfg(not(feature = "fast"))]
|
|
|
|
+const USERS: usize = 10000;
|
|
|
|
+
|
|
struct PerfStat {
|
|
struct PerfStat {
|
|
// Report performance metrics for each test
|
|
// Report performance metrics for each test
|
|
req_len: usize,
|
|
req_len: usize,
|
|
@@ -751,7 +756,7 @@ fn stats_test_trust_levels() {
|
|
let mut open_req_time: Vec<f64> = Vec::new();
|
|
let mut open_req_time: Vec<f64> = Vec::new();
|
|
let mut open_resp_time: Vec<f64> = Vec::new();
|
|
let mut open_resp_time: Vec<f64> = Vec::new();
|
|
let mut open_resp_handle_time: Vec<f64> = Vec::new();
|
|
let mut open_resp_handle_time: Vec<f64> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -874,7 +879,7 @@ fn stats_test_invitations() {
|
|
let mut red_req_time: Vec<f64> = Vec::new();
|
|
let mut red_req_time: Vec<f64> = Vec::new();
|
|
let mut red_resp_time: Vec<f64> = Vec::new();
|
|
let mut red_resp_time: Vec<f64> = Vec::new();
|
|
let mut red_resp_handle_time: Vec<f64> = Vec::new();
|
|
let mut red_resp_handle_time: Vec<f64> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
|
|
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
@@ -925,7 +930,7 @@ fn stats_test_percent_blockage_migration_05() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -958,7 +963,7 @@ fn stats_test_percent_blockage_migration_010() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -991,7 +996,7 @@ fn stats_test_percent_blockage_migration_15() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -1024,7 +1029,7 @@ fn stats_test_percent_blockage_migration_20() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -1057,7 +1062,7 @@ fn stats_test_percent_blockage_migration_25() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -1090,7 +1095,7 @@ fn stats_test_percent_blockage_migration_30() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -1123,7 +1128,7 @@ fn stats_test_percent_blockage_migration_35() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -1156,7 +1161,7 @@ fn stats_test_percent_blockage_migration_40() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -1189,7 +1194,7 @@ fn stats_test_percent_blockage_migration_45() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -1222,7 +1227,7 @@ fn stats_test_percent_blockage_migration_50() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -1255,7 +1260,7 @@ fn stats_test_percent_blockage_migration_55() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -1288,7 +1293,7 @@ fn stats_test_percent_blockage_migration_60() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -1321,7 +1326,7 @@ fn stats_test_percent_blockage_migration_65() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -1354,7 +1359,7 @@ fn stats_test_percent_blockage_migration_70() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -1387,7 +1392,7 @@ fn stats_test_percent_blockage_migration_75() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -1420,7 +1425,7 @@ fn stats_test_percent_blockage_migration_80() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -1453,7 +1458,7 @@ fn stats_test_percent_blockage_migration_85() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -1486,7 +1491,7 @@ fn stats_test_percent_blockage_migration_90() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -1519,7 +1524,7 @@ fn stats_test_percent_blockage_migration_95() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|
|
@@ -1552,7 +1557,7 @@ fn stats_test_percent_blockage_migration_100() {
|
|
for x in buckets {
|
|
for x in buckets {
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut th = TestHarness::new_buckets(x, x);
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
let mut credentials: Vec<cred::Lox> = Vec::new();
|
|
- for _ in 0..10000 {
|
|
|
|
|
|
+ for _ in 0..USERS {
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
let h: NaiveTime = DateTime::time(&Utc::now());
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
if h.hour() == 23 && h.minute() == 59 {
|
|
println!("Wait for UTC 00:00");
|
|
println!("Wait for UTC 00:00");
|