summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
authorNicolas Schodet2012-10-04 14:19:38 +0200
committerNicolas Schodet2012-10-19 15:17:47 +0200
commitb47f8edd2efa4e5035176e17f2c6c0f5c0c8e264 (patch)
tree5aa860a8972c4dc65fc5f07dab0e1eef52015d87 /cesar
parentb5dff87b5075f28a51effdf8e2006074f191c12e (diff)
cesar/common/tools/traceviewer: default to read trace bundles
Trace bundles are now common and offer more features, make this the default.
Diffstat (limited to 'cesar')
-rw-r--r--cesar/common/tools/traceviewer/command.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/cesar/common/tools/traceviewer/command.py b/cesar/common/tools/traceviewer/command.py
index a61f666aca..655e241846 100644
--- a/cesar/common/tools/traceviewer/command.py
+++ b/cesar/common/tools/traceviewer/command.py
@@ -14,9 +14,12 @@ def open_file (f, *args):
return open (f, *args)
def run ():
- opt = OptionParser (usage = 'usage: %prog [options] trace1 trace2...')
+ opt = OptionParser (usage = 'usage: %prog [options] bundle1 bundle2...')
+ opt.add_option ('-r', '--raw', action = 'append', default = [ ],
+ help='read unbundled traces from FILE', metavar='FILE')
opt.add_option ('-b', '--bundle', action = 'append', default = [ ],
- help='read several bundled traces from FILE', metavar='FILE')
+ help='read several bundled traces from FILE (deprecated)',
+ metavar='FILE')
opt.add_option ('-z', '--zoom', type = 'float', default = 1.0,
help='set initial zoom level to ZOOM', metavar='ZOOM')
opt.add_option ('-i', '--include', action = 'append',
@@ -26,10 +29,10 @@ def run ():
(options, args) = opt.parse_args ()
# Read traces.
traces = [ ]
- for f in args:
+ for f in options.raw:
t = read_traces_from_dump (f, open_file (f))
traces.extend (t)
- for f in options.bundle:
+ for f in options.bundle + args:
bs = read_bundles_from_dump (f, open_file (f))
for b in bs:
traces.extend (b.traces)