[tor-commits] [onionperf/develop] Order analysis and filter keys, authored by Karsten

karsten at torproject.org karsten at torproject.org
Wed Sep 16 15:15:08 UTC 2020


commit 7b0c91f1983ab21f39f37b83d3a58db5a4d11a8f
Author: Ana Custura <ana at netstat.org.uk>
Date:   Thu Sep 10 12:37:00 2020 +0100

    Order analysis and filter keys, authored by Karsten
---
 onionperf/filtering.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/onionperf/filtering.py b/onionperf/filtering.py
index c008c03..7ef6168 100644
--- a/onionperf/filtering.py
+++ b/onionperf/filtering.py
@@ -65,10 +65,12 @@ class Filtering(object):
                                 break
                 if not keep:
                     tor_circuits[circuit_id]["filtered"] = True
+                    tor_circuits[circuit_id] = dict(sorted(tor_circuit.items()))
 
     def apply_filters(self, input_path, output_dir, output_file):
         self.analysis = OPAnalysis.load(filename=input_path)
         self.filter_tor_circuits(self.analysis)
         self.analysis.json_db["filters"] = self.filters
+        self.analysis.json_db = dict(sorted(self.analysis.json_db.items()))
         self.analysis.save(filename=output_file, output_prefix=output_dir, sort_keys=False)
 





More information about the tor-commits mailing list