Patchwork [1/2] buildhistory: correctly handle reductions of numeric fields

login
register
mail settings
Submitter Ross Burton
Date July 30, 2012, 12:18 p.m.
Message ID <1343650687-2307-1-git-send-email-ross.burton@intel.com>
Download mbox | patch
Permalink /patch/33293/
State Accepted
Commit 94fffb92e6a7a8021fb1acb06b9c4218703e23b2
Headers show

Comments

Ross Burton - July 30, 2012, 12:18 p.m.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/lib/oe/buildhistory_analysis.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Paul Eggleton - July 30, 2012, 12:20 p.m.
On Monday 30 July 2012 13:18:06 Ross Burton wrote:
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>  meta/lib/oe/buildhistory_analysis.py |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/lib/oe/buildhistory_analysis.py
> b/meta/lib/oe/buildhistory_analysis.py index 29dc4a9..d0e0808 100644
> --- a/meta/lib/oe/buildhistory_analysis.py
> +++ b/meta/lib/oe/buildhistory_analysis.py
> @@ -300,7 +300,7 @@ def compare_dict_blobs(path, ablob, bblob, report_all):
>                      percentchg = ((bval - aval) / float(aval)) * 100
>                  else:
>                      percentchg = 100
> -                if percentchg < monitor_numeric_threshold:
> +                if abs(percentchg) < monitor_numeric_threshold:
>                      continue
>              elif (not report_all) and key in list_fields:
>                  if key == "FILELIST" and path.endswith("-dbg") and
> bstr.strip() != '':

Acked-by: Paul Eggleton <paul.eggleton@linux.intel.com>

Patch

diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index 29dc4a9..d0e0808 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -300,7 +300,7 @@  def compare_dict_blobs(path, ablob, bblob, report_all):
                     percentchg = ((bval - aval) / float(aval)) * 100
                 else:
                     percentchg = 100
-                if percentchg < monitor_numeric_threshold:
+                if abs(percentchg) < monitor_numeric_threshold:
                     continue
             elif (not report_all) and key in list_fields:
                 if key == "FILELIST" and path.endswith("-dbg") and bstr.strip() != '':