summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2020-05-13 22:34:50 +0200
committerKarsten Loesing <karsten.loesing@gmx.net>2020-05-13 22:34:50 +0200
commit747dd627fd05a85c69735ea09560258354c1a507 (patch)
treece0a9c34b0c1f2f42476f80e64bd9d5fb74980c9
parente845ce35c17d1330bf35aeee0e610c5a009a0423 (diff)
squash! Adds support for recording seconds elapsed before downloading certain numbers of bytestask-26673
- Add two more payload byte sizes to complete the 1-2-5 series. - "Document" the new "payload_bytes" field in README_JSON.md.
-rw-r--r--README_JSON.md11
-rw-r--r--onionperf/analysis.py2
2 files changed, 12 insertions, 1 deletions
diff --git a/README_JSON.md b/README_JSON.md
index e3e64dd..d057bb1 100644
--- a/README_JSON.md
+++ b/README_JSON.md
@@ -16,6 +16,17 @@ The structure is given here with variable keys marked as such.
"command": 0.319006, # step 7 if using a proxy, else step 3 (initial GET/PUT)
"first_byte": 0.0, # step 9 if using a proxy, else step 5 (initial GET/PUT)
"last_byte": 0.0, # step 11 if using a proxy, else step 7 (initial GET/PUT)
+ "payload_bytes": { # similar to payload_progress below
+ "10240": 0.0, # number of payload bytes completed : seconds to complete it
+ "20480": 0.0,
+ "51200": 0.0,
+ "102400": 0.0,
+ "204800": 0.0,
+ "512000": 0.0,
+ "1048576": 0.0,
+ "2097152": 0.0,
+ "5242880": 0.0
+ },
"payload_progress": { # step 10 if using a proxy, else step 6 (initial GET/PUT)
"0.0": 0.0, # percent of payload completed : seconds to complete it
"0.1": 0.0,
diff --git a/onionperf/analysis.py b/onionperf/analysis.py
index be65607..dfdf2a6 100644
--- a/onionperf/analysis.py
+++ b/onionperf/analysis.py
@@ -414,7 +414,7 @@ class Transfer(object):
self.id = tid
self.last_event = None
self.payload_progress = {decile:None for decile in [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]}
- self.payload_bytes = {partial:None for partial in [10240, 20480, 51200, 102400, 1048576, 2097152, 5242880]}
+ self.payload_bytes = {partial:None for partial in [10240, 20480, 51200, 102400, 204800, 512000, 1048576, 2097152, 5242880]}
def add_event(self, status_event):
progress_frac = float(status_event.payload_bytes_status) / float(status_event.filesize_bytes)