aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn B. Brandenburg <bbb@cs.unc.edu>2010-10-09 23:01:55 -0400
committerBjörn B. Brandenburg <bbb@cs.unc.edu>2010-10-09 23:01:55 -0400
commit79d98c8afd83fb79650bb197c586db9007349670 (patch)
tree8b762f5288734468b4e41274f0281d179f1a318b
parent3ed207174794c60c9030edd367425e99a4c6fe74 (diff)
plot: recognize exponential distributions
-rwxr-xr-xplot.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/plot.py b/plot.py
index c6676e7..3347993 100755
--- a/plot.py
+++ b/plot.py
@@ -88,6 +88,7 @@ def get_data_tmpfile(datafile, target=None):
88 88
89def scenario_heading(conf, want_period=False): 89def scenario_heading(conf, want_period=False):
90 dist = 'unknown distribution' 90 dist = 'unknown distribution'
91 period = None
91 if 'dist' in conf: 92 if 'dist' in conf:
92 if conf['dist'] == 'uni': 93 if conf['dist'] == 'uni':
93 dist = 'utilization uniformly ' 94 dist = 'utilization uniformly '
@@ -123,9 +124,16 @@ def scenario_heading(conf, want_period=False):
123 dist = dist + 'in [0.001, 0.5] (6/9) and [0.5, %s] (3/9)' % cap 124 dist = dist + 'in [0.001, 0.5] (6/9) and [0.5, %s] (3/9)' % cap
124 elif 'heavy' == weight: 125 elif 'heavy' == weight:
125 dist = dist + 'in [0.001, 0.5] (4/9) and [0.5, %s] (5/9)' % cap 126 dist = dist + 'in [0.001, 0.5] (4/9) and [0.5, %s] (5/9)' % cap
127 m = re.match('exp-(\d+)-(\d+)-(\d+)', conf['dist'])
128 if m:
129 mean = (float(m.group(1)) / 100)
130 period = (m.group(2), m.group(3))
131 dist = "util. exponentially in [0, 1] with mean %.2f" % mean
126 132
127 if want_period: 133 if want_period:
128 if '33' in conf: 134 if period:
135 dist += '; period uniformly in [%s, %s]' % period
136 elif '33' in conf:
129 dist += '; period uniformly in [3, 33]' 137 dist += '; period uniformly in [3, 33]'
130 elif '250' in conf: 138 elif '250' in conf:
131 dist += '; period uniformly in [50, 250]' 139 dist += '; period uniformly in [50, 250]'