diff options
Diffstat (limited to 'analyze')
-rwxr-xr-x | analyze | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -22,11 +22,16 @@ opts = [ | |||
22 | 22 | ||
23 | o('-o', '--outlier-list', action='store', dest='outlier_file', | 23 | o('-o', '--outlier-list', action='store', dest='outlier_file', |
24 | help='list of outliers to remove'), | 24 | help='list of outliers to remove'), |
25 | |||
26 | o('-m', '--max-value', action='store', dest='maxval', type='float', | ||
27 | help='maximum sample threshold (higher values discarded)'), | ||
28 | |||
25 | ] | 29 | ] |
26 | 30 | ||
27 | defaults = { | 31 | defaults = { |
28 | 'cycles' : 2128, | 32 | 'cycles' : 2128, |
29 | 'extent' : 0, | 33 | 'extent' : 0, |
34 | 'maxval' : 1000.0, | ||
30 | 'cutoff' : None, | 35 | 'cutoff' : None, |
31 | 'outlier_file' : None, | 36 | 'outlier_file' : None, |
32 | 'outliers' : {}, | 37 | 'outliers' : {}, |
@@ -36,11 +41,11 @@ options = None | |||
36 | 41 | ||
37 | def fmt_cell(x): | 42 | def fmt_cell(x): |
38 | if type(x) == str: | 43 | if type(x) == str: |
39 | return "%15s" % x | 44 | return "%25s" % x |
40 | if type(x) == int: | 45 | if type(x) == int: |
41 | return "%15d" % x | 46 | return "%25d" % x |
42 | else: | 47 | else: |
43 | return "%15.5f" % x | 48 | return "%25.5f" % x |
44 | 49 | ||
45 | def write_header(): | 50 | def write_header(): |
46 | labels = ["Plugin", "Overhead", "#tasks", | 51 | labels = ["Plugin", "Overhead", "#tasks", |
@@ -71,10 +76,17 @@ def stats_file(fname): | |||
71 | stats = bd.compact_file(fname, | 76 | stats = bd.compact_file(fname, |
72 | extent=options.extent, | 77 | extent=options.extent, |
73 | scale=scale, | 78 | scale=scale, |
79 | maxval=options.maxval, | ||
74 | cutoff=options.cutoff, | 80 | cutoff=options.cutoff, |
75 | manual=take_off) | 81 | manual=take_off) |
76 | info = [conf['scheduler'], conf['overhead'], conf['n']] | 82 | if 'locks' in conf: |
83 | sched = '%s_locks=%s' % (conf['scheduler'], conf['locks']) | ||
84 | else: | ||
85 | sched = conf['scheduler'] | ||
86 | |||
87 | info = [sched, conf['overhead'], conf['n']] | ||
77 | print ", ".join([fmt_cell(x) for x in info + stats]) | 88 | print ", ".join([fmt_cell(x) for x in info + stats]) |
89 | sys.stdout.flush() | ||
78 | 90 | ||
79 | if __name__ == '__main__': | 91 | if __name__ == '__main__': |
80 | parser = optparse.OptionParser(option_list=opts) | 92 | parser = optparse.OptionParser(option_list=opts) |