diff options
author | mbeierl <mark.beierl@dell.com> | 2017-02-16 10:40:35 -0500 |
---|---|---|
committer | mbeierl <mark.beierl@dell.com> | 2017-02-16 13:16:51 -0500 |
commit | ac7b5490cb305468b0bd961fc5caad9c51b8b77b (patch) | |
tree | 8c4975a2dab26fc551ce0d933395c37375f5a423 /storperf/utilities | |
parent | acfadc79623d9ac6ec0a625ba69b356b71606252 (diff) |
Prevent notifications after termination
Changes the event notification logic inside the FIO invoker
so that it no longer publishes events after termination.
Prevents false reports after steady state has been detected.
Change-Id: I694f77b6493b88820fe4f4cc7f634e3e62c45a9a
JIRA: STORPERF-105
Signed-off-by: mbeierl <mark.beierl@dell.com>
Diffstat (limited to 'storperf/utilities')
-rw-r--r-- | storperf/utilities/data_handler.py | 2 | ||||
-rw-r--r-- | storperf/utilities/math.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/storperf/utilities/data_handler.py b/storperf/utilities/data_handler.py index e38f502..a4c9ae4 100644 --- a/storperf/utilities/data_handler.py +++ b/storperf/utilities/data_handler.py @@ -125,7 +125,7 @@ class DataHandler(object): for item in series: elapsed = (item[0] - start_time) - sample_number = (elapsed / 60) + 1 + sample_number = int(round(float(elapsed) / 60)) normalized_series.append([sample_number, item[1]]) return normalized_series diff --git a/storperf/utilities/math.py b/storperf/utilities/math.py index 4ddddca..8e04134 100644 --- a/storperf/utilities/math.py +++ b/storperf/utilities/math.py @@ -6,6 +6,7 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +import copy def slope(data_series): @@ -20,7 +21,7 @@ def slope(data_series): [[x1,y1], [x2,y2], ..., [xm,ym]]. If this data pattern were to change, the data_treatement function should be adjusted to ensure compatibility with the rest of the - Steady State Dectection module. + Steady State Detection module. """ # In the particular case of an empty data series @@ -28,6 +29,7 @@ def slope(data_series): beta2 = None else: # The general case + data_series = copy.deepcopy(data_series) m = len(data_series) # To make sure at least one element is a float number so the result # of the algorithm be a float number |