Pārlūkot izejas kodu

Added some fixes and requested touchups from artifact review

onyinyang 2 gadi atpakaļ
vecāks
revīzija
3ca7f0a030
5 mainītis faili ar 45 papildinājumiem un 48 dzēšanām
  1. 1 3
      Dockerfile
  2. 1 1
      Parsing-results/pets_plots.py
  3. 19 19
      README.md
  4. 19 19
      run_tests_fast.sh
  5. 5 6
      src/tests.rs

+ 1 - 3
Dockerfile

@@ -8,8 +8,6 @@ ADD Parsing-results ./Parsing-results
 ADD README.md README.md
 RUN apt update -y
 RUN apt install -y python3 python3-pip
-RUN pip3 install pandas
-RUN pip3 install numpy
-RUN pip3 install matplotlib
+RUN pip3 install -r Parsing-results/requirements.txt
 RUN cargo build --release
 ENV SHELL=/bin/bash

+ 1 - 1
Parsing-results/pets_plots.py

@@ -23,7 +23,7 @@ def main():
                 df.ResponseT+df.ReTstdev, alpha=0.5, edgecolor='#CC4F1B',
                 facecolor='#FF9848')
     plt.tight_layout(pad=1)
-    plt.savefig("StandardCheck.pdf")
+    plt.savefig("Blockage-response-time.pdf")
     plt.close('all')
 
 def set_plot_options():

+ 19 - 19
README.md

@@ -21,24 +21,24 @@ Where `TESTNAME > LOGFILE` is one of:
 ```
 stats_test_trust_levels  > trust_levels.log
 stats_test_invitations > invitations.log
-stats_test_percent_blockage_migration_05 > check_blockage05.log
-stats_test_percent_blockage_migration_010 > check_blockage010.log
-stats_test_percent_blockage_migration_20 > check_blockage20.log
-stats_test_percent_blockage_migration_25 > check_blockage25.log
-stats_test_percent_blockage_migration_35 > check_blockage35.log
-stats_test_percent_blockage_migration_40 > check_blockage40.log
-stats_test_percent_blockage_migration_45 > check_blockage45.log
-stats_test_percent_blockage_migration_50 > check_blockage50.log
-stats_test_percent_blockage_migration_55 > check_blockage55.log
-stats_test_percent_blockage_migration_60 > check_blockage60.log
-stats_test_percent_blockage_migration_65 > check_blockage65.log
-stats_test_percent_blockage_migration_70 > check_blockage70.log
-stats_test_percent_blockage_migration_75 > check_blockage75.log
-stats_test_percent_blockage_migration_80 > check_blockage80.log
-stats_test_percent_blockage_migration_85 > check_blockage85.log
-stats_test_percent_blockage_migration_90 > check_blockage90.log
-stats_test_percent_blockage_migration_95 > check_blockage95.log
-stats_test_percent_blockage_migration_100 > check_blockage100.log
+stats_test_percent_blockage_migration_05 > blockage_migration05.log
+stats_test_percent_blockage_migration_010 > blockage_migration010.log
+stats_test_percent_blockage_migration_20 > blockage_migration20.log
+stats_test_percent_blockage_migration_25 > blockage_migration25.log
+stats_test_percent_blockage_migration_35 > blockage_migration35.log
+stats_test_percent_blockage_migration_40 > blockage_migration40.log
+stats_test_percent_blockage_migration_45 > blockage_migration45.log
+stats_test_percent_blockage_migration_50 > blockage_migration50.log
+stats_test_percent_blockage_migration_55 > blockage_migration55.log
+stats_test_percent_blockage_migration_60 > blockage_migration60.log
+stats_test_percent_blockage_migration_65 > blockage_migration65.log
+stats_test_percent_blockage_migration_70 > blockage_migration70.log
+stats_test_percent_blockage_migration_75 > blockage_migration75.log
+stats_test_percent_blockage_migration_80 > blockage_migration80.log
+stats_test_percent_blockage_migration_85 > blockage_migration85.log
+stats_test_percent_blockage_migration_90 > blockage_migration90.log
+stats_test_percent_blockage_migration_95 > blockage_migration95.log
+stats_test_percent_blockage_migration_100 > blockage_migration100.log
 ```
 
 Each test outputs results to the specified log file and takes approximately 20-30 hours to run. However, this can be improved
@@ -53,7 +53,7 @@ flag run:
 
 We have also included the scripts we used to parse the output from each of the Lox tests in the `Parsing-results` directory. For convenience, copy all of the output log files to the `Parsing-results` directory and run `./parse_data.sh`. This is a python script that uses Python 3.8+ and depends on `numpy`, `matplotlib`, and `pandas` which can be installed with `pip3`.
 
-To run all tests in fast mode, output the results to the `Parsing-results` directory, and generate the table (`performance_stats.csv`, our Table 4) and graphs (`StandardCheck.pdf` and `core-users.pdf`, our Figures 1 and 2) used in our paper, run:
+To run all tests in fast mode, output the results to the `Parsing-results` directory, and generate the table (`performance_stats.csv`, our Table 4) and graphs (`Blockage-response-time.pdf` and `core-users.pdf`, our Figures 1 and 2) used in our paper, run:
 
 ```
 ./run_tests_fast

+ 19 - 19
run_tests_fast.sh

@@ -2,25 +2,25 @@
 
 cargo test --release --features=fast -- --nocapture stats_test_trust_levels > trust_levels.log
 cargo test --release --features=fast -- --nocapture stats_test_invitations > invitations.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_05 > check_blockage05.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_010 > check_blockage010.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_20 > check_blockage20.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_25 > check_blockage25.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_30 > check_blockage30.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_35 > check_blockage35.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_40 > check_blockage40.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_45 > check_blockage45.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_50 > check_blockage50.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_55 > check_blockage55.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_60 > check_blockage60.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_65 > check_blockage65.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_70 > check_blockage70.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_75 > check_blockage75.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_80 > check_blockage80.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_85 > check_blockage85.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_90 > check_blockage90.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_95 > check_blockage95.log
-cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_100 > check_blockage100.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_05 > blockage_migration05.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_010 > blockage_migration010.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_20 > blockage_migration20.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_25 > blockage_migration25.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_30 > blockage_migration30.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_35 > blockage_migration35.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_40 > blockage_migration40.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_45 > blockage_migration45.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_50 > blockage_migration50.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_55 > blockage_migration55.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_60 > blockage_migration60.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_65 > blockage_migration65.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_70 > blockage_migration70.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_75 > blockage_migration75.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_80 > blockage_migration80.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_85 > blockage_migration85.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_90 > blockage_migration90.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_95 > blockage_migration95.log
+cargo test --release --features=fast -- --nocapture stats_test_percent_blockage_migration_100 > blockage_migration100.log
 echo "Completed all tests, now parsing results"
 mv *.log Parsing-results
 cd Parsing-results

+ 5 - 6
src/tests.rs

@@ -1686,16 +1686,15 @@ fn print_stats_test_results(
     resp_handle_time: Vec<f64>,
 ) {
     let mean_req_size = mean(&req_size);
-    let req_std_dev = standard_deviation(&req_size, Some(mean_req_size));
+    let req_std_dev = if &req_size.len() > &1 {standard_deviation(&req_size, Some(mean_req_size))} else {0.0};
     let mean_req_time = mean(&req_time);
-    let req_time_std_dev = standard_deviation(&req_time, Some(mean_req_time));
+    let req_time_std_dev = if &req_time.len() > &1 {standard_deviation(&req_time, Some(mean_req_time))} else {0.0};
     let mean_resp_size = mean(&resp_size);
-    let resp_std_dev = standard_deviation(&resp_size, Some(mean_resp_size));
+    let resp_std_dev = if &resp_size.len() > &1 {standard_deviation(&resp_size, Some(mean_resp_size))} else {0.0};
     let mean_resp_time = mean(&resp_time);
-    let resp_time_std_dev = standard_deviation(&resp_time, Some(mean_resp_time));
+    let resp_time_std_dev = if &resp_time.len() > &1 {standard_deviation(&resp_time, Some(mean_resp_time))} else {0.0};
     let mean_resp_handle_time = mean(&resp_handle_time);
-    let resp_handle_time_std_dev =
-        standard_deviation(&resp_handle_time, Some(mean_resp_handle_time));
+    let resp_handle_time_std_dev = if &resp_handle_time.len() > &1 {standard_deviation(&resp_handle_time, Some(mean_resp_handle_time))} else {0.0};
 
     println!("Average request size = {} bytes", mean_req_size);
     println!("Request size standard deviation = {} bytes", req_std_dev);