diff options
author | Mac Mollison <mollison@cs.unc.edu> | 2009-02-24 17:34:07 -0500 |
---|---|---|
committer | Mac Mollison <mollison@cs.unc.edu> | 2009-02-24 17:34:07 -0500 |
commit | 9fc7d10c40f19aea990dba776dd571d982da04e9 (patch) | |
tree | f9df03c76642d14d550a3593d2f06810e5a07f36 /run.py | |
parent | 150cdb350f75dc86bd6be23c6eb37719dc61d3cf (diff) |
Major update.
-Completed sort method
-Moved print functions into Trace object, resuling in much nicer
interface
-Created ability to count records by type
Diffstat (limited to 'run.py')
-rwxr-xr-x | run.py | 18 |
1 files changed, 8 insertions, 10 deletions
@@ -7,23 +7,21 @@ import sta | |||
7 | 7 | ||
8 | def main(): | 8 | def main(): |
9 | 9 | ||
10 | #trace = sta.Trace(short_list) | 10 | # A sample trace |
11 | trace = sta.Trace(g6_list) | 11 | trace = sta.Trace(g6_list) |
12 | trace.filter("pid==4125") | ||
13 | trace.sort('job') | ||
14 | trace.print_count(True) | ||
15 | trace.print_records() | ||
12 | 16 | ||
17 | #Some other things you can do (old commands I've used) | ||
13 | #trace.filter("exec_time>8828") | 18 | #trace.filter("exec_time>8828") |
14 | #trace.filter("job==12") | 19 | #trace.filter("job==12") |
15 | #trace.filter("when>2000000000") | 20 | #trace.filter("when>2000000000") |
16 | #trace.filter("when<2500000000") | 21 | #trace.filter("when<2500000000") |
17 | #trace.filter("forced?==True") | 22 | #trace.filter("forced?==True") |
18 | 23 | #trace.filter("type==1") | |
19 | trace.filter("type==1") | 24 | #trace.filter("type!=3") |
20 | #trace.sort(lambda x: x['pid'] or 0) | ||
21 | |||
22 | for record in trace.iter: | ||
23 | sta.print_record_verbose(record) | ||
24 | |||
25 | |||
26 | |||
27 | 25 | ||
28 | 26 | ||
29 | ###################################### | 27 | ###################################### |