aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn B. Brandenburg <bbb@cs.unc.edu>2010-06-09 12:02:37 -0400
committerBjörn B. Brandenburg <bbb@cs.unc.edu>2010-06-09 12:02:37 -0400
commita0afdca82d1b408d67c2ae91aa7e888d1db33def (patch)
tree23f753edc21d2fe35587802a5ff780f0cd6f1c7b
parent61d816ccbf9e179e5dd9abd4a6056bcaeef7fb05 (diff)
support labelling "new" distributions
-rwxr-xr-xplot.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/plot.py b/plot.py
index c542506..b23f2c5 100755
--- a/plot.py
+++ b/plot.py
@@ -1,5 +1,8 @@
1#!/usr/bin/env python 1#!/usr/bin/env python
2import defapp 2import defapp
3
4import re
5
3from os.path import splitext, basename 6from os.path import splitext, basename
4from optparse import make_option as o 7from optparse import make_option as o
5from tempfile import NamedTemporaryFile as Tmp 8from tempfile import NamedTemporaryFile as Tmp
@@ -86,6 +89,23 @@ def scenario_heading(conf, want_period=False):
86 dist = dist + 'in [0.001, 0.5] (6/9) and [0.5, 0.9] (3/9)' 89 dist = dist + 'in [0.001, 0.5] (6/9) and [0.5, 0.9] (3/9)'
87 elif 'heavy' in conf: 90 elif 'heavy' in conf:
88 dist = dist + 'in [0.001, 0.5] (4/9) and [0.5, 0.9] (5/9)' 91 dist = dist + 'in [0.001, 0.5] (4/9) and [0.5, 0.9] (5/9)'
92 else:
93 # try regular expressions
94 m = re.match('uni-(\d\.\d+)-(\d\.\d+)', conf['dist'])
95 if m:
96 dist = "utilization uniformly in [%s, %s]" % (m.group(1), m.group(2))
97 m = re.match('bimo-([^-]+)-(\d\.\d+)', conf['dist'])
98 if m:
99 weight = m.group(1)
100 cap = m.group(2)
101 dist = 'util. bimodally '
102 if 'light' == weight:
103 dist = dist + 'in [0.001, 0.5] (8/9) and [0.5, %s] (1/9)' % cap
104 elif 'medium' == weight:
105 dist = dist + 'in [0.001, 0.5] (6/9) and [0.5, %s] (3/9)' % cap
106 elif 'heavy' == weight:
107 dist = dist + 'in [0.001, 0.5] (4/9) and [0.5, %s] (5/9)' % cap
108
89 if want_period: 109 if want_period:
90 if '33' in conf: 110 if '33' in conf:
91 dist += '; period uniformly in [3, 33]' 111 dist += '; period uniformly in [3, 33]'