diff options
author | mbeierl <mark.beierl@dell.com> | 2018-08-16 13:15:47 -0400 |
---|---|---|
committer | mbeierl <mark.beierl@dell.com> | 2018-08-16 13:15:47 -0400 |
commit | 562e802575abc79598ed2ef58a837a146be644c4 (patch) | |
tree | 22014009d01771d4a2ecd6d8647936a621db1274 /docker/storperf-master/storperf/utilities/math.py | |
parent | 5930150915999fd410d7a2da38723065bcf7c91f (diff) |
Fixing series data.opnfv-7.0.stable.RC3
Changes the min and max series to also contain the
index to make plotting easier.
Change-Id: Ifbb43658338d6389705e7f146fa1ca6e13c202ce
Signed-off-by: mbeierl <mark.beierl@dell.com>
Diffstat (limited to 'docker/storperf-master/storperf/utilities/math.py')
-rw-r--r-- | docker/storperf-master/storperf/utilities/math.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/docker/storperf-master/storperf/utilities/math.py b/docker/storperf-master/storperf/utilities/math.py index 601ae37..173c39e 100644 --- a/docker/storperf-master/storperf/utilities/math.py +++ b/docker/storperf-master/storperf/utilities/math.py @@ -152,11 +152,14 @@ def min_series(data_series): """ new_series = [] - avg = average(data_series) + average_series = [] + for l in data_series: + average_series.append(l[1]) + avg = average(average_series) low = avg - (avg * RANGE_DEVIATION) - for _ in data_series: - new_series.append(low) + for index, _ in data_series: + new_series.append([index, low]) return new_series @@ -168,10 +171,13 @@ def max_series(data_series): """ new_series = [] - avg = average(data_series) + average_series = [] + for l in data_series: + average_series.append(l[1]) + avg = average(average_series) high = avg + (avg * RANGE_DEVIATION) - for _ in data_series: - new_series.append(high) + for index, _ in data_series: + new_series.append([index, high]) return new_series |