diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2011-02-19 21:46:36 -0500 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2011-02-19 21:46:36 -0500 |
commit | 6ef974b4841b758045eaf1866dcbc77a30d7b478 (patch) | |
tree | 4d9304b50d9bcc96370d45a28944e40d24378985 | |
parent | fc0321becd40f60363702c2b6ac64b1a89a9d2c4 (diff) |
support #sample cutoff and new API
-rwxr-xr-x | analyze | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -16,11 +16,15 @@ opts = [ | |||
16 | o('-i', '--iqr-extent', action='store', dest='extent', type='float', | 16 | o('-i', '--iqr-extent', action='store', dest='extent', type='float', |
17 | help='what extent to use for outlier removal'), | 17 | help='what extent to use for outlier removal'), |
18 | 18 | ||
19 | o('-c', '--cut-off', action='store', dest='cutoff', type='int', | ||
20 | help='max number of samples to use'), | ||
21 | |||
19 | ] | 22 | ] |
20 | 23 | ||
21 | defaults = { | 24 | defaults = { |
22 | 'cycles' : 2128, | 25 | 'cycles' : 2128, |
23 | 'extent' : 3.0, | 26 | 'extent' : 3.0, |
27 | 'cutoff' : None, | ||
24 | } | 28 | } |
25 | 29 | ||
26 | options = None | 30 | options = None |
@@ -48,7 +52,10 @@ def stats_file(fname): | |||
48 | scale = 1.0 / options.cycles | 52 | scale = 1.0 / options.cycles |
49 | if conf['overhead'] == 'RELEASE-LATENCY': | 53 | if conf['overhead'] == 'RELEASE-LATENCY': |
50 | scale = 1.0 / 1000 # convert from nanoseconds | 54 | scale = 1.0 / 1000 # convert from nanoseconds |
51 | stats = bd.compact_file(fname, extend=options.extent, scale=scale) | 55 | stats = bd.compact_file(fname, |
56 | extent=options.extent, | ||
57 | scale=scale, | ||
58 | cutoff=options.cutoff) | ||
52 | info = [conf['scheduler'], conf['overhead'], conf['n']] | 59 | info = [conf['scheduler'], conf['overhead'], conf['n']] |
53 | print ", ".join([fmt_cell(x) for x in info + stats]) | 60 | print ", ".join([fmt_cell(x) for x in info + stats]) |
54 | 61 | ||