diff options
Diffstat (limited to 'unit-trace')
| -rwxr-xr-x | unit-trace | 10 |
1 files changed, 6 insertions, 4 deletions
| @@ -22,7 +22,6 @@ from unit_trace import skipper | |||
| 22 | from unit_trace import maxer | 22 | from unit_trace import maxer |
| 23 | from unit_trace import earliest | 23 | from unit_trace import earliest |
| 24 | from unit_trace import latest | 24 | from unit_trace import latest |
| 25 | from unit_trace import viz | ||
| 26 | 25 | ||
| 27 | # Get trace files from command line arguments | 26 | # Get trace files from command line arguments |
| 28 | from optparse import OptionParser | 27 | from optparse import OptionParser |
| @@ -42,12 +41,14 @@ parser.add_option("-o", "--stdout", action="store_true", dest="stdout", | |||
| 42 | default=False, help="Use stdout_printer") | 41 | default=False, help="Use stdout_printer") |
| 43 | parser.add_option("-v", "--visual", action="store_true", dest="visualize", | 42 | parser.add_option("-v", "--visual", action="store_true", dest="visualize", |
| 44 | default=False, help="Use visualizer") | 43 | default=False, help="Use visualizer") |
| 44 | parser.add_option("-t", "--time-per-maj", default=10000000.0, type=float, | ||
| 45 | dest="time_per_maj", help="Time interval between major ticks, in the visualizer") | ||
| 45 | parser.add_option("-c", "--clean", action="store_true", dest="clean", | 46 | parser.add_option("-c", "--clean", action="store_true", dest="clean", |
| 46 | default=False, help="Use sanitizer to clean garbage records") | 47 | default=False, help="Use sanitizer to clean garbage records") |
| 47 | parser.add_option("-e", "--earliest", default=0, type=int, dest="earliest", | 48 | parser.add_option("-e", "--earliest", default=0, type=int, dest="earliest", |
| 48 | help="Earliest timestamp of interst") | 49 | help="Earliest timestamp of interest") |
| 49 | parser.add_option("-l", "--latest", default=0, type=int, dest="latest", | 50 | parser.add_option("-l", "--latest", default=0, type=int, dest="latest", |
| 50 | help="Latest timestamp of interst") | 51 | help="Latest timestamp of interest") |
| 51 | (options, traces) = parser.parse_args() | 52 | (options, traces) = parser.parse_args() |
| 52 | traces = list(traces) | 53 | traces = list(traces) |
| 53 | if len(traces) < 1: | 54 | if len(traces) < 1: |
| @@ -119,4 +120,5 @@ if options.num_inversions > -1: | |||
| 119 | 120 | ||
| 120 | # Call visualizer | 121 | # Call visualizer |
| 121 | if options.visualize is True: | 122 | if options.visualize is True: |
| 122 | viz.visualizer.visualizer(stream3) | 123 | from unit_trace import viz |
| 124 | viz.visualizer.visualizer(stream3, options.time_per_maj) | ||
