From cac86ada2b9ae9ac67a800db3bb6da80183267ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Sun, 1 Jan 2023 15:28:03 +0100 Subject: [PATCH] donate-cpu-server.py: fixed factor calculation when base time is 0.0 (#4671) --- tools/donate-cpu-server.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/donate-cpu-server.py b/tools/donate-cpu-server.py index 78f3e79ef..18e05ec6e 100755 --- a/tools/donate-cpu-server.py +++ b/tools/donate-cpu-server.py @@ -26,7 +26,7 @@ from urllib.parse import urlparse # Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/ # Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic # changes) -SERVER_VERSION = "1.3.34" +SERVER_VERSION = "1.3.35" OLD_VERSION = '2.9' @@ -750,7 +750,9 @@ def timeReport(resultPath: str, show_gt: bool, query_params: dict) -> str: if time_base > 0.0 and time_head > 0.0: time_factor = time_head / time_base elif time_base == 0.0: - time_factor = time_head + # the smallest possible value is 0.1 so treat that as an increase of 100% + # on top of the existing 100% (treating the base 0.0 as such). + time_factor = 1.0 + (time_head * 10) else: time_factor = 0.0 suspicious_time_difference = False