Explorar o código

Moved README and fixed substring issue

onyinyang %!s(int64=2) %!d(string=hai) anos
pai
achega
367476fe3f
Modificáronse 2 ficheiros con 44 adicións e 44 borrados
  1. 2 2
      README.md
  2. 42 42
      src/tests.rs

+ 2 - 2
src/readme.md → README.md

@@ -6,12 +6,12 @@ Lox is written in rust and requires `cargo` to test. [Install Rust](https://www.
 ### To run the tests used for our experimental results:
 
 ```
-cargo test -- --nocapture stats_test > stats_test.log
+cargo test --release -- --nocapture stats_test > stats_test.log
 ```
 Note that: our implementation is coded such that the reachability certificate expires at 00:00 UTC. A workaround has been included in each test to pause if it is too close to this time so the request won't fail. In reality, if the bucket is still reachable, a user could simply request a new reachability token if their request fails for this reason (a new certificate should be available prior to the outdated certificate expiring).
 
 ### To run all Lox tests:
 
 ```
-cargo test -- --nocapture test > testing.log
+cargo test --release -- --nocapture test > testing.log
 ```

+ 42 - 42
src/tests.rs

@@ -757,7 +757,7 @@ fn stats_test_trust_levels() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let (open_perf_stat, cred) = th.open_invite();
             th.advance_days(30);
             let (tp_perf_stat, migcred) = th.trust_promotion(&cred.0);
@@ -881,7 +881,7 @@ fn stats_test_invitations() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -919,7 +919,7 @@ fn stats_test_invitations() {
 }
 
 #[test]
-fn stats_test_blockage_migration_5() {
+fn stats_test_percent_blockage_migration_5() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -931,7 +931,7 @@ fn stats_test_blockage_migration_5() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -952,7 +952,7 @@ fn stats_test_blockage_migration_5() {
 }
 
 #[test]
-fn stats_test_blockage_migration_10() {
+fn stats_test_percent_blockage_migration_10() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -964,7 +964,7 @@ fn stats_test_blockage_migration_10() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -985,7 +985,7 @@ fn stats_test_blockage_migration_10() {
 }
 
 #[test]
-fn stats_test_blockage_migration_15() {
+fn stats_test_percent_blockage_migration_15() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -997,7 +997,7 @@ fn stats_test_blockage_migration_15() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -1018,7 +1018,7 @@ fn stats_test_blockage_migration_15() {
 }
 
 #[test]
-fn stats_test_blockage_migration_20() {
+fn stats_test_percent_blockage_migration_20() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -1030,7 +1030,7 @@ fn stats_test_blockage_migration_20() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -1051,7 +1051,7 @@ fn stats_test_blockage_migration_20() {
 }
 
 #[test]
-fn stats_test_blockage_migration_25() {
+fn stats_test_percent_blockage_migration_25() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -1063,7 +1063,7 @@ fn stats_test_blockage_migration_25() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -1084,7 +1084,7 @@ fn stats_test_blockage_migration_25() {
 }
 
 #[test]
-fn stats_test_blockage_migration_30() {
+fn stats_test_percent_blockage_migration_30() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -1096,7 +1096,7 @@ fn stats_test_blockage_migration_30() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -1117,7 +1117,7 @@ fn stats_test_blockage_migration_30() {
 }
 
 #[test]
-fn stats_test_blockage_migration_35() {
+fn stats_test_percent_blockage_migration_35() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -1129,7 +1129,7 @@ fn stats_test_blockage_migration_35() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -1150,7 +1150,7 @@ fn stats_test_blockage_migration_35() {
 }
 
 #[test]
-fn stats_test_blockage_migration_40() {
+fn stats_test_percent_blockage_migration_40() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -1162,7 +1162,7 @@ fn stats_test_blockage_migration_40() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -1183,7 +1183,7 @@ fn stats_test_blockage_migration_40() {
 }
 
 #[test]
-fn stats_test_blockage_migration_45() {
+fn stats_test_percent_blockage_migration_45() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -1195,7 +1195,7 @@ fn stats_test_blockage_migration_45() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -1216,7 +1216,7 @@ fn stats_test_blockage_migration_45() {
 }
 
 #[test]
-fn stats_test_blockage_migration_50() {
+fn stats_test_percent_blockage_migration_50() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -1228,7 +1228,7 @@ fn stats_test_blockage_migration_50() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -1249,7 +1249,7 @@ fn stats_test_blockage_migration_50() {
 }
 
 #[test]
-fn stats_test_blockage_migration_55() {
+fn stats_test_percent_blockage_migration_55() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -1261,7 +1261,7 @@ fn stats_test_blockage_migration_55() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -1282,7 +1282,7 @@ fn stats_test_blockage_migration_55() {
 }
 
 #[test]
-fn stats_test_blockage_migration_60() {
+fn stats_test_percent_blockage_migration_60() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -1294,7 +1294,7 @@ fn stats_test_blockage_migration_60() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -1315,7 +1315,7 @@ fn stats_test_blockage_migration_60() {
 }
 
 #[test]
-fn stats_test_blockage_migration_65() {
+fn stats_test_percent_blockage_migration_65() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -1327,7 +1327,7 @@ fn stats_test_blockage_migration_65() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -1348,7 +1348,7 @@ fn stats_test_blockage_migration_65() {
 }
 
 #[test]
-fn stats_test_blockage_migration_70() {
+fn stats_test_percent_blockage_migration_70() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -1360,7 +1360,7 @@ fn stats_test_blockage_migration_70() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -1381,7 +1381,7 @@ fn stats_test_blockage_migration_70() {
 }
 
 #[test]
-fn stats_test_blockage_migration_75() {
+fn stats_test_percent_blockage_migration_75() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -1393,7 +1393,7 @@ fn stats_test_blockage_migration_75() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -1414,7 +1414,7 @@ fn stats_test_blockage_migration_75() {
 }
 
 #[test]
-fn stats_test_blockage_migration_80() {
+fn stats_test_percent_blockage_migration_80() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -1426,7 +1426,7 @@ fn stats_test_blockage_migration_80() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -1447,7 +1447,7 @@ fn stats_test_blockage_migration_80() {
 }
 
 #[test]
-fn stats_test_blockage_migration_85() {
+fn stats_test_percent_blockage_migration_85() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -1459,7 +1459,7 @@ fn stats_test_blockage_migration_85() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -1480,7 +1480,7 @@ fn stats_test_blockage_migration_85() {
 }
 
 #[test]
-fn stats_test_blockage_migration_90() {
+fn stats_test_percent_blockage_migration_90() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -1492,7 +1492,7 @@ fn stats_test_blockage_migration_90() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -1513,7 +1513,7 @@ fn stats_test_blockage_migration_90() {
 }
 
 #[test]
-fn stats_test_blockage_migration_95() {
+fn stats_test_percent_blockage_migration_95() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -1525,7 +1525,7 @@ fn stats_test_blockage_migration_95() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);
@@ -1546,7 +1546,7 @@ fn stats_test_blockage_migration_95() {
 }
 
 #[test]
-fn stats_test_blockage_migration_100() {
+fn stats_test_percent_blockage_migration_100() {
     let buckets: Vec<u16> = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500];
 
     for x in buckets {
@@ -1558,7 +1558,7 @@ fn stats_test_blockage_migration_100() {
                 println!("Wait for UTC 00:00");
 		thread::sleep(Duration::new(60,0));
                 println!("Ready to work again");
-            } 
+            }
             let cred = th.open_invite().1 .0;
             th.advance_days(30);
             let (_, migcred) = th.trust_promotion(&cred);