[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [onionperf/develop] Only try to load analysis files in an input directory
commit d21d41e4d504b48ac5617530830da320a89a9eed
Author: Ana Custura <ana@xxxxxxxxxxxxxx>
Date: Sat Aug 29 15:10:32 2020 +0100
Only try to load analysis files in an input directory
---
onionperf/onionperf | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/onionperf/onionperf b/onionperf/onionperf
index 7c16aea..e3f49c8 100755
--- a/onionperf/onionperf
+++ b/onionperf/onionperf
@@ -458,11 +458,12 @@ def filter(args):
output_dir, output_file = os.path.split(output_path)
filtering.apply_filters(input_path=input_path, output_dir=output_dir, output_file=output_file)
else:
- for dirpath, dirnames, filenames in os.walk(input_path):
- for filename in filenames:
- input_file = os.path.join(dirpath, filename)
- output_dir = os.path.join(output_path, os.path.relpath(dirpath, input_path))
- filtering.apply_filters(input_path=input_file, output_dir=output_dir, output_file=filename)
+ from onionperf import reprocessing
+ analyses = reprocessing.collect_logs(input_path, '*onionperf.analysis.*')
+ for analysis in analyses:
+ full_output_path = os.path.join(output_path, os.path.relpath(analysis, input_path))
+ output_dir, output_file = os.path.split(full_output_path)
+ filtering.apply_filters(input_path=analysis, output_dir=output_dir, output_file=output_file)
def visualize(args):
from onionperf.visualization import TGenVisualization
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits