|
@@ -714,13 +714,12 @@ fn test_blockage_migration() {
|
|
|
fn stats_test_open_invite() {
|
|
|
let mut th = TestHarness::new_buckets(10, 10);
|
|
|
|
|
|
- println!("\n---------------Open Invitationn-------------------\n");
|
|
|
let mut req_size: Vec<f64> = Vec::new();
|
|
|
let mut resp_size: Vec<f64> = Vec::new();
|
|
|
let mut req_t_size: Vec<f64> = Vec::new();
|
|
|
let mut resp_t_size: Vec<f64> = Vec::new();
|
|
|
let mut resp_handle_t_size: Vec<f64> = Vec::new();
|
|
|
- for _ in 0..1000 {
|
|
|
+ for _ in 0..10000 {
|
|
|
let (perf_stat, _) = th.open_invite();
|
|
|
req_size.push(perf_stat.req_len as f64);
|
|
|
req_t_size.push(perf_stat.req_t.as_secs_f64());
|
|
@@ -729,6 +728,7 @@ fn stats_test_open_invite() {
|
|
|
resp_handle_t_size.push(perf_stat.resp_handle_t.as_secs_f64());
|
|
|
}
|
|
|
|
|
|
+ println!("\n---------------Open Invitationn-------------------\n");
|
|
|
print_stats_test_results(
|
|
|
req_size,
|
|
|
req_t_size,
|
|
@@ -741,14 +741,13 @@ fn stats_test_open_invite() {
|
|
|
#[test]
|
|
|
fn stats_test_trust_promotion() {
|
|
|
let mut th = TestHarness::new_buckets(10, 10);
|
|
|
- println!("\n-------Trust Promotion--------\n");
|
|
|
|
|
|
let mut req_size: Vec<f64> = Vec::new();
|
|
|
let mut resp_size: Vec<f64> = Vec::new();
|
|
|
let mut req_t_size: Vec<f64> = Vec::new();
|
|
|
let mut resp_t_size: Vec<f64> = Vec::new();
|
|
|
let mut resp_handle_t_size: Vec<f64> = Vec::new();
|
|
|
- for _ in 0..1000 {
|
|
|
+ for _ in 0..10000 {
|
|
|
let cred = th.open_invite().1 .0;
|
|
|
th.advance_days(47);
|
|
|
let (perf_stat, _) = th.trust_promotion(&cred);
|
|
@@ -759,6 +758,7 @@ fn stats_test_trust_promotion() {
|
|
|
resp_handle_t_size.push(perf_stat.resp_handle_t.as_secs_f64());
|
|
|
}
|
|
|
|
|
|
+ println!("\n-------Trust Promotion--------\n");
|
|
|
print_stats_test_results(
|
|
|
req_size,
|
|
|
req_t_size,
|
|
@@ -772,7 +772,6 @@ fn stats_test_trust_promotion() {
|
|
|
fn stats_test_trust_level0_migration() {
|
|
|
let mut th = TestHarness::new_buckets(10, 10);
|
|
|
|
|
|
- println!("\n-------------Trust Level0 Migration----------------\n");
|
|
|
let mut req_size: Vec<f64> = Vec::new();
|
|
|
let mut resp_size: Vec<f64> = Vec::new();
|
|
|
let mut req_t_size: Vec<f64> = Vec::new();
|
|
@@ -783,7 +782,7 @@ fn stats_test_trust_level0_migration() {
|
|
|
let mut tot_req_t_size: Vec<f64> = Vec::new();
|
|
|
let mut tot_resp_t_size: Vec<f64> = Vec::new();
|
|
|
let mut tot_resp_handle_t_size: Vec<f64> = Vec::new();
|
|
|
- for _ in 0..1000 {
|
|
|
+ for _ in 0..10000 {
|
|
|
let cred = th.open_invite().1 .0;
|
|
|
th.advance_days(47);
|
|
|
let (tp_perf_stat, migcred) = th.trust_promotion(&cred);
|
|
@@ -801,6 +800,7 @@ fn stats_test_trust_level0_migration() {
|
|
|
.push((perf_stat.resp_handle_t + tp_perf_stat.resp_handle_t).as_secs_f64());
|
|
|
}
|
|
|
|
|
|
+ println!("\n-------------Trust Level0 Migration----------------\n");
|
|
|
print_stats_test_results(
|
|
|
req_size,
|
|
|
req_t_size,
|
|
@@ -823,7 +823,6 @@ fn stats_test_trust_level0_migration() {
|
|
|
fn stats_test_trust_level_up() {
|
|
|
let mut th = TestHarness::new_buckets(10, 10);
|
|
|
|
|
|
- println!("\n---Trust Promotion + Migration to Level 1: 30 days----\n");
|
|
|
let mut req_size: Vec<f64> = Vec::new();
|
|
|
let mut resp_size: Vec<f64> = Vec::new();
|
|
|
let mut req_t_size: Vec<f64> = Vec::new();
|
|
@@ -844,7 +843,7 @@ fn stats_test_trust_level_up() {
|
|
|
let mut four_req_t_size: Vec<f64> = Vec::new();
|
|
|
let mut four_resp_t_size: Vec<f64> = Vec::new();
|
|
|
let mut four_resp_handle_t_size: Vec<f64> = Vec::new();
|
|
|
- for _ in 0..1000 {
|
|
|
+ for _ in 0..10000 {
|
|
|
let cred = th.open_invite().1 .0;
|
|
|
th.advance_days(30);
|
|
|
let (tp_perf_stat, migcred) = th.trust_promotion(&cred);
|
|
@@ -878,6 +877,7 @@ fn stats_test_trust_level_up() {
|
|
|
four_resp_handle_t_size.push(four_perf_stat.resp_handle_t.as_secs_f64());
|
|
|
}
|
|
|
|
|
|
+ println!("\n---Trust Promotion + Migration to Level 1: 30 days----\n");
|
|
|
print_stats_test_results(
|
|
|
req_size,
|
|
|
req_t_size,
|
|
@@ -918,7 +918,6 @@ fn stats_test_trust_level_up() {
|
|
|
fn stats_test_invitations() {
|
|
|
let mut th = TestHarness::new_buckets(10, 10);
|
|
|
|
|
|
- println!("\n---------------Issue Invitation----------------\n");
|
|
|
let mut req_size: Vec<f64> = Vec::new();
|
|
|
let mut resp_size: Vec<f64> = Vec::new();
|
|
|
let mut req_t_size: Vec<f64> = Vec::new();
|
|
@@ -929,7 +928,7 @@ fn stats_test_invitations() {
|
|
|
let mut red_req_t_size: Vec<f64> = Vec::new();
|
|
|
let mut red_resp_t_size: Vec<f64> = Vec::new();
|
|
|
let mut red_resp_handle_t_size: Vec<f64> = Vec::new();
|
|
|
- for _ in 0..1000 {
|
|
|
+ for _ in 0..10000 {
|
|
|
let cred = th.open_invite().1 .0;
|
|
|
th.advance_days(30);
|
|
|
let (_, migcred) = th.trust_promotion(&cred);
|
|
@@ -951,6 +950,7 @@ fn stats_test_invitations() {
|
|
|
red_resp_handle_t_size.push(bob_perf_stat.resp_handle_t.as_secs_f64());
|
|
|
}
|
|
|
|
|
|
+ println!("\n---------------Issue Invitation----------------\n");
|
|
|
print_stats_test_results(
|
|
|
req_size,
|
|
|
req_t_size,
|
|
@@ -971,7 +971,6 @@ fn stats_test_invitations() {
|
|
|
|
|
|
#[test]
|
|
|
fn stats_test_blockage_migration() {
|
|
|
- println!("\n---------------Check Blockage----------------\n");
|
|
|
let mut req_size: Vec<f64> = Vec::new();
|
|
|
let mut resp_size: Vec<f64> = Vec::new();
|
|
|
let mut req_t_size: Vec<f64> = Vec::new();
|
|
@@ -982,7 +981,7 @@ fn stats_test_blockage_migration() {
|
|
|
let mut red_req_t_size: Vec<f64> = Vec::new();
|
|
|
let mut red_resp_t_size: Vec<f64> = Vec::new();
|
|
|
let mut red_resp_handle_t_size: Vec<f64> = Vec::new();
|
|
|
- for _ in 0..1000 {
|
|
|
+ for _ in 0..10000 {
|
|
|
let mut th = TestHarness::new_buckets(3, 3);
|
|
|
let cred = th.open_invite().1 .0;
|
|
|
th.advance_days(30);
|
|
@@ -1014,6 +1013,7 @@ fn stats_test_blockage_migration() {
|
|
|
red_resp_handle_t_size.push(block_perf_stat.resp_handle_t.as_secs_f64());
|
|
|
}
|
|
|
|
|
|
+ println!("\n---------------Check Blockage----------------\n");
|
|
|
print_stats_test_results(
|
|
|
req_size,
|
|
|
req_t_size,
|