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

[tor-commits] [ooni-probe/master] Jot down some quick notes



commit df54cb8f831b1165450cf0a09c2b4d4ff3a79f9d
Author: Arturo Filastò <arturo@xxxxxxxxxxx>
Date:   Wed Nov 7 21:19:27 2012 +0100

    Jot down some quick notes
---
 ooni/config.py |    4 ++++
 ooni/runner.py |    5 ++++-
 ooniprobe.conf |    3 +++
 3 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ooni/config.py b/ooni/config.py
index 5880d69..64bc973 100644
--- a/ooni/config.py
+++ b/ooni/config.py
@@ -6,6 +6,8 @@
 import os
 import yaml
 
+from twisted.python.threadpool import ThreadPool
+
 from ooni.utils import Storage
 
 def get_root_path():
@@ -39,3 +41,5 @@ advanced = Storage()
 for k, v in configuration['advanced'].items():
     advanced[k] = v
 
+threadpool = ThreadPool(0, config.advanced.threadpool_size)
+threadpool.start()
diff --git a/ooni/runner.py b/ooni/runner.py
index b4d9560..ead81ea 100644
--- a/ooni/runner.py
+++ b/ooni/runner.py
@@ -8,7 +8,7 @@
 # :license: see included LICENSE file
 # :copyright: (c) 2012 Isis Lovecruft, Arturo Filasto, The Tor Project, Inc.
 # :version: 0.1.0-pre-alpha
-#
+
 import os
 import inspect
 
@@ -22,6 +22,7 @@ from ooni.nettest import InputTestSuite
 
 from ooni.reporter import ReporterFactory
 from ooni.utils import log, date
+from ooni import config
 
 def processTest(obj, cmd_line_options):
     """
@@ -203,6 +204,8 @@ class ORunner(object):
         log.debug("Finished")
         result.done()
 
+        config.threadpool.stop()
+
     def run(self):
         self.reporterFactory.options = self.options
         for input_unit in InputUnitFactory(self.inputs):
diff --git a/ooniprobe.conf b/ooniprobe.conf
index 2039951..3250c4d 100644
--- a/ooniprobe.conf
+++ b/ooniprobe.conf
@@ -15,6 +15,8 @@ privacy:
     includecountry: false
     # Should we include the ASN of the probe in the report?
     includecity: false
+    # Should we collect a full packet capture on the client?
+    includepcap: true
 
 advanced:
     # XXX change this to point to the directory where you have stored the GeoIP
@@ -22,4 +24,5 @@ advanced:
     # /path/to/ooni-probe/data/
     geoip_data_dir: /home/x/code/networking/ooni-probe/data/
     debug: true
+    threadpool_size: 10
 



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