diff options
| -rwxr-xr-x | plot.py | 10 |
1 files changed, 9 insertions, 1 deletions
| @@ -88,6 +88,7 @@ def get_data_tmpfile(datafile, target=None): | |||
| 88 | 88 | ||
| 89 | def scenario_heading(conf, want_period=False): | 89 | def 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]' |
