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

[tor-commits] [ooni-probe/master] Set the measurement_start_time closer to the test method call to improve accuracy



commit cb718ade5beaf546bb87375f4a79bf16bd15956a
Author: Arturo Filastò <arturo@xxxxxxxxxxx>
Date:   Thu Mar 17 19:44:49 2016 +0100

    Set the measurement_start_time closer to the test method call to improve accuracy
---
 ooni/tasks.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ooni/tasks.py b/ooni/tasks.py
index b5a15e0..381902a 100644
--- a/ooni/tasks.py
+++ b/ooni/tasks.py
@@ -116,8 +116,6 @@ class Measurement(TaskWithTimeout):
 
         if 'input' not in self.testInstance.report.keys():
             self.testInstance.report['input'] = test_input
-        if 'measurement_start_time' not in self.testInstance.report.keys():
-            self.testInstance.report['measurement_start_time'] = otime.UTCTimestampNow()
 
         self.testInstance.setUp()
 
@@ -141,6 +139,8 @@ class Measurement(TaskWithTimeout):
         pass
 
     def run(self):
+        if 'measurement_start_time' not in self.testInstance.report.keys():
+            self.testInstance.report['measurement_start_time'] = otime.UTCTimestampNow()
         return self.netTestMethod()
 
 



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