Trending: use 2*stdev 75/12175/1
authorTibor Frank <tifrank@cisco.com>
Thu, 26 Apr 2018 10:34:28 +0000 (12:34 +0200)
committerTibor Frank <tifrank@cisco.com>
Thu, 26 Apr 2018 10:34:28 +0000 (12:34 +0200)
Change-Id: I24ba8d268a25d5b5c249cde47a13468dfab57a4b
Signed-off-by: Tibor Frank <tifrank@cisco.com>
resources/tools/presentation/generator_CPTA.py
resources/tools/presentation/generator_tables.py

index e3cc55f..d72be3d 100644 (file)
@@ -172,13 +172,13 @@ def _evaluate_results(trimmed_data, window=10):
             if first:
                 first = False
                 continue
             if first:
                 first = False
                 continue
-            if (np.isnan(value) \
-                    or np.isnan(tmm[build_nr]) \
+            if (np.isnan(value)
+                    or np.isnan(tmm[build_nr])
                     or np.isnan(tmstd[build_nr])):
                 results.append(0.0)
                     or np.isnan(tmstd[build_nr])):
                 results.append(0.0)
-            elif value < (tmm[build_nr] - 3 * tmstd[build_nr]):
+            elif value < (tmm[build_nr] - 2 * tmstd[build_nr]):
                 results.append(0.33)
                 results.append(0.33)
-            elif value > (tmm[build_nr] + 3 * tmstd[build_nr]):
+            elif value > (tmm[build_nr] + 2 * tmstd[build_nr]):
                 results.append(1.0)
             else:
                 results.append(0.66)
                 results.append(1.0)
             else:
                 results.append(0.66)
@@ -187,10 +187,10 @@ def _evaluate_results(trimmed_data, window=10):
         try:
             tmm = np.median(trimmed_data)
             tmstd = np.std(trimmed_data)
         try:
             tmm = np.median(trimmed_data)
             tmstd = np.std(trimmed_data)
-            if trimmed_data.values[-1] < (tmm - 3 * tmstd):
+            if trimmed_data.values[-1] < (tmm - 2 * tmstd):
                 results.append(0.33)
                 results.append(0.33)
-            elif (tmm - 3 * tmstd) <= trimmed_data.values[-1] <= (
-                    tmm + 3 * tmstd):
+            elif (tmm - 2 * tmstd) <= trimmed_data.values[-1] <= (
+                    tmm + 2 * tmstd):
                 results.append(0.66)
             else:
                 results.append(1.0)
                 results.append(0.66)
             else:
                 results.append(1.0)
index 6948b45..db79396 100644 (file)
@@ -806,9 +806,9 @@ def table_performance_trending_dashboard(table, input_data):
                         or isnan(stdev_t[build_nr]) \
                         or isnan(value):
                     classification_lst.append("outlier")
                         or isnan(stdev_t[build_nr]) \
                         or isnan(value):
                     classification_lst.append("outlier")
-                elif value < (median_t[build_nr] - 3 * stdev_t[build_nr]):
+                elif value < (median_t[build_nr] - 2 * stdev_t[build_nr]):
                     classification_lst.append("regression")
                     classification_lst.append("regression")
-                elif value > (median_t[build_nr] + 3 * stdev_t[build_nr]):
+                elif value > (median_t[build_nr] + 2 * stdev_t[build_nr]):
                     classification_lst.append("progression")
                 else:
                     classification_lst.append("normal")
                     classification_lst.append("progression")
                 else:
                     classification_lst.append("normal")

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.