[tor-bugs] #34191 [Metrics/Onionperf]: Combine multiple analysis files into single data set
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sun May 31 14:31:04 UTC 2020
#34191: Combine multiple analysis files into single data set
-------------------------------+--------------------------------
Reporter: karsten | Owner: acute
Type: enhancement | Status: accepted
Priority: Medium | Milestone:
Component: Metrics/Onionperf | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: #33321 | Points: 0.5
Reviewer: | Sponsor: Sponsor59-must
-------------------------------+--------------------------------
Comment (by acute):
This is now ready to review at: https://github.com/ana-
cc/onionperf/tree/34191
The visualize command now accepts a mix of one or more multiple files or
directories in each dataset!
{{{
onionperf visualize -d file1 file2 label1 -d file3 file4 label2
onionperf visualize -d dir1 label1
onionperf visualize -d dir1 dir2 label1 -d dir3 dir4 label2
onionperf visualize -d dir1 file1 file2 label1 -d file3 file4 dir2 label2
...etc
}}}
There have been quite a few changes:
* We reuse the existing command `reprocessing.collect_logs` in the
reprocessing module, with the search pattern `*json*` to find analysis
files in supplied directories; I thought about using `*json.xz` as a
pattern as well, but it probably does not matter too much. This seems to
work nicely!
* All the analysis files given by the user or found in directories are
collected in a list of 'analyses'
* The visualization module now iterates through the list of supplied
'analyses' to load data
* The label can no longer be a path - that is, if we detect the last
argument supplied to this command is a path, we complain. This is to avoid
the case where the user forgets to supply a label, and instead the last
path supplied is used as a label instead:
{{{
$ onionperf visualize -d file1 file2 file3
usage: onionperf visualize [-h] -d PATH [LABEL ...] [-p STRING]
onionperf visualize: error: argument -d/--data: The supplied label cannot
be a path
}}}
Let me know if you have any questions, this is quite a sizeable change!
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/34191#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list