From 79d98c8afd83fb79650bb197c586db9007349670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=2E=20Brandenburg?= Date: Sat, 9 Oct 2010 23:01:55 -0400 Subject: plot: recognize exponential distributions --- plot.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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): def scenario_heading(conf, want_period=False): dist = 'unknown distribution' + period = None if 'dist' in conf: if conf['dist'] == 'uni': dist = 'utilization uniformly ' @@ -123,9 +124,16 @@ def scenario_heading(conf, want_period=False): dist = dist + 'in [0.001, 0.5] (6/9) and [0.5, %s] (3/9)' % cap elif 'heavy' == weight: dist = dist + 'in [0.001, 0.5] (4/9) and [0.5, %s] (5/9)' % cap + m = re.match('exp-(\d+)-(\d+)-(\d+)', conf['dist']) + if m: + mean = (float(m.group(1)) / 100) + period = (m.group(2), m.group(3)) + dist = "util. exponentially in [0, 1] with mean %.2f" % mean if want_period: - if '33' in conf: + if period: + dist += '; period uniformly in [%s, %s]' % period + elif '33' in conf: dist += '; period uniformly in [3, 33]' elif '250' in conf: dist += '; period uniformly in [50, 250]' -- cgit v1.2.2