[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [onionperf/master] Removes DATAPERC fields in case of transfer errors
commit 7b9662d733d14fcd56cd080d682c7ed5dba3f560
Author: Ana Custura <ana@xxxxxxxxxxxxxx>
Date: Thu Apr 25 14:01:43 2019 +0100
Removes DATAPERC fields in case of transfer errors
---
onionperf/analysis.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/onionperf/analysis.py b/onionperf/analysis.py
index 2c3c580..316cec7 100644
--- a/onionperf/analysis.py
+++ b/onionperf/analysis.py
@@ -236,6 +236,9 @@ class Analysis(object):
if decile in xfer_db['elapsed_seconds']['payload_progress'] and xfer_db['elapsed_seconds']['payload_progress'][decile] is not None:
decile_as_int = int(float(decile) * 100)
d['DATAPERC{0}'.format(decile_as_int)] = ts_to_str(xfer_db['unix_ts_start'] + xfer_db['elapsed_seconds']['payload_progress'][decile])
+ else:
+ for i in range(1, 10):
+ d.pop('DATAPERC{}0'.format(i))
if 'last_byte' in xfer_db['elapsed_seconds']:
d['DATACOMPLETE'] = ts_to_str(xfer_db['unix_ts_start'] + xfer_db['elapsed_seconds']['last_byte'])
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits