[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [onionperf/master] Adds support for a list of multiple analyses
commit 7032b4fdc3441c06bf08ddf3a7f9055c1b53cd64
Author: Ana Custura <ana@xxxxxxxxxxxxxx>
Date: Sun May 31 14:24:50 2020 +0100
Adds support for a list of multiple analyses
---
onionperf/onionperf | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/onionperf/onionperf b/onionperf/onionperf
index d5352b0..85cfca1 100755
--- a/onionperf/onionperf
+++ b/onionperf/onionperf
@@ -282,7 +282,7 @@ files generated by this script will be written""",
analysis results file or directory of such files, and a LABEL
that we should use for the graph legend for this dataset""",
metavar=("PATH", "LABEL"),
- nargs=2,
+ nargs='+',
required="True",
action=PathStringArgsAction, dest="datasets")
@@ -384,11 +384,13 @@ def visualize(args):
from onionperf.analysis import Analysis
tgen_viz = TGenVisualization()
- for (path, label) in args.datasets:
- anal = Analysis.load(filename=path)
- if anal is not None:
- tgen_viz.add_dataset(anal, label)
-
+ for (paths, label) in args.datasets:
+ analyses = []
+ for path in paths:
+ analysis = Analysis.load(filename=path)
+ if analysis is not None:
+ analyses.append(analysis)
+ tgen_viz.add_dataset(analyses, label)
tgen_viz.plot_all(args.prefix)
def type_nonnegative_integer(value):
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits