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

art at torproject.org art at torproject.org
Fri Apr 29 09:42:25 UTC 2016


commit cb718ade5beaf546bb87375f4a79bf16bd15956a
Author: Arturo Filastò <arturo at filasto.net>
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()
 
 





More information about the tor-commits mailing list