From bcc8f683f74d92e35a93a8a0c6c5c7d9757b7c00 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Mon, 4 Nov 2024 14:39:51 +0100 Subject: [PATCH] use baseline for denominator in percentage diff in resources-diff.py --- comparisons/resources-diff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comparisons/resources-diff.py b/comparisons/resources-diff.py index e6cf2cdf2e2..27dcd0becc0 100755 --- a/comparisons/resources-diff.py +++ b/comparisons/resources-diff.py @@ -15,8 +15,8 @@ def diff_from(metrics, data, dest, res): dkey = "%s_diff" % metric res[dkey] = dmetric pdmetric = 0.0 - if not dest[metric] == 0.0: - pdmetric = 100 * dmetric / dest[metric] + if not data[metric] == 0.0: + pdmetric = 100 * dmetric / data[metric] pdkey = "%s_pdiff" % metric res[pdkey] = pdmetric