[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [onionperf/master] Fixes oneshot message appearing every time a measurement is ran



commit 0e8a2e0978293becfe0a19dd1aef562f1c0ed550
Author: Ana C. Custura <ana@xxxxxxxxxxxxxx>
Date:   Thu May 23 12:50:00 2019 +0100

    Fixes oneshot message appearing every time a measurement is ran
---
 onionperf/measurement.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/onionperf/measurement.py b/onionperf/measurement.py
index cb7db48..e1c95a6 100644
--- a/onionperf/measurement.py
+++ b/onionperf/measurement.py
@@ -241,7 +241,8 @@ class Measurement(object):
 
                 logging.info("Bootstrapping finished, entering heartbeat loop")
                 time.sleep(1)
-                logging.info("Onionperf is running in Oneshot mode. It will download a 5M file and shut down gracefully...")
+                if self.oneshot:
+                    logging.info("Onionperf is running in Oneshot mode. It will download a 5M file and shut down gracefully...")
                 while True:
                     # TODO add status update of some kind? maybe the number of files in the www directory?
                     # logging.info("Heartbeat: {0} downloads have completed successfully".format(self.__get_download_count(tgen_client_writable.filename)))

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits