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

irl at torproject.org irl at torproject.org
Mon May 27 09:28:45 UTC 2019


commit 0e8a2e0978293becfe0a19dd1aef562f1c0ed550
Author: Ana C. Custura <ana at netstat.org.uk>
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)))



More information about the tor-commits mailing list