summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2011-02-19 21:46:36 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2011-02-19 21:46:36 -0500
commit6ef974b4841b758045eaf1866dcbc77a30d7b478 (patch)
tree4d9304b50d9bcc96370d45a28944e40d24378985
parentfc0321becd40f60363702c2b6ac64b1a89a9d2c4 (diff)
support #sample cutoff and new API
-rwxr-xr-xanalyze9
1 files changed, 8 insertions, 1 deletions
diff --git a/analyze b/analyze
index 95d8585..521b86c 100755
--- a/analyze
+++ b/analyze
@@ -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
21defaults = { 24defaults = {
22 'cycles' : 2128, 25 'cycles' : 2128,
23 'extent' : 3.0, 26 'extent' : 3.0,
27 'cutoff' : None,
24 } 28 }
25 29
26options = None 30options = 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