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

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



commit 7b0c91f1983ab21f39f37b83d3a58db5a4d11a8f
Author: Ana Custura <ana@xxxxxxxxxxxxxx>
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)
 



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