Selaa lähdekoodia

Fixed up README

Lindsey Tulloch 2 vuotta sitten
vanhempi
commit
b4fc2bb594
2 muutettua tiedostoa jossa 22 lisäystä ja 93 poistoa
  1. 22 24
      README.md
  2. 0 69
      src/stddev.py

+ 22 - 24
README.md

@@ -13,37 +13,35 @@ Lox is written in rust and requires `cargo` to test. [Install Rust](https://www.
 ### To run each of the tests used for our experimental results run:
 
 ```
-cargo test --release -- --nocapture TESTNAME >> TESTNAME.log
+cargo test --release -- --nocapture TESTNAME
 ```
 
 Where `TESTNAME` is one of:
 
 ```
-stats_test_trust_levels
-stats_test_invitations
-stats_test_percent_blockage_migration_05
-stats_test_percent_blockage_migration_010
-stats_test_percent_blockage_migration_15
-stats_test_percent_blockage_migration_20
-stats_test_percent_blockage_migration_25
-stats_test_percent_blockage_migration_30
-stats_test_percent_blockage_migration_35
-stats_test_percent_blockage_migration_40
-stats_test_percent_blockage_migration_45
-stats_test_percent_blockage_migration_50
-stats_test_percent_blockage_migration_55
-stats_test_percent_blockage_migration_60
-stats_test_percent_blockage_migration_65
-stats_test_percent_blockage_migration_70
-stats_test_percent_blockage_migration_75
-stats_test_percent_blockage_migration_80
-stats_test_percent_blockage_migration_85
-stats_test_percent_blockage_migration_90
-stats_test_percent_blockage_migration_95
-stats_test_percent_blockage_migration_100
+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
 ```
 
-Each test takes approximately 20-30 hours to run. However, this can be improved
+Each test outputs results to the specified log file and takes approximately 20-30 hours to run. However, this can be improved
 by passing the `fast` feature. Using this feature, our tests are run for 100
 users instead of 10000 users and will produce results comparable to our
 reported results (with larger error margins). To run individual tests with this

+ 0 - 69
src/stddev.py

@@ -1,69 +0,0 @@
-log_file = open("test_raw_data.log", "r").readlines()
-test_file = open("issue_stddev.csv", "w")
-block_file = open("redeem_stddev.csv", "w")
-open_file = open("open_stddev.csv", "w")
-promo_file = open("promo_stddev.csv", "w")
-
-test_file.write("RequestT,ResponseT,ResponseHT\n")
-block_file.write("RequestT,ResponseT,ResponseHT\n")
-open_file.write("RequestT,ResponseT,ResponseHT\n")
-promo_file.write("RequestT,ResponseT,ResponseHT\n")
-
-
-
-blockage = 0
-num = 0
-req_time = 0
-resp_time = 0
-resp_handle = 0
-endline = 0
-
-# Loop over the remaining lines in the file
-for line in log_file:
-    if "ISSUE_INVITE" in line:
-        blockage = 1
-
-    elif "REDEEM_INVITE" in line:
-        blockage = 2
-
-    elif "OPEN_INVITE" in line:
-        blockage = 3
-    elif "TRUST_PROMOTION" in line:
-        blockage = 4
-
-    elif "tests::stats" in line:
-        blockage = 0
-
-    elif blockage:
-        value = line.split(" = ")
-        if value[0].startswith("Request"):
-            to_sec = value[1][:-3]
-            req_time = to_sec
-
-        elif value[0].startswith("Response"):
-            to_sec = value[1][:-3]
-            if "handle" in value[0]:
-                resp_handle_time = to_sec
-                endline = 1
-            else:
-                resp_time = to_sec
-
-
-    if endline == 1:
-        if blockage == 1:
-            test_file.write(str(req_time)+ "," + str(resp_time) + "," + str(resp_handle_time) + "\n")
-            endline = 0
-        elif blockage == 2:
-            block_file.write(str(req_time) + ","  + str(resp_time) + "," + str(resp_handle_time) + "\n")
-            endline = 0
-        elif blockage == 3:
-            open_file.write(str(req_time) + ","  + str(resp_time) + "," + str(resp_handle_time) + "\n")
-            endline = 0
-        elif blockage == 4:
-            promo_file.write(str(req_time) + ","  + str(resp_time) + "," + str(resp_handle_time) + "\n")
-            endline = 0
-        blockage = 0
-
-test_file.close()
-block_file.close()
-print("Done.")