Skip to content

Commit cac86ad

Browse files
authored
donate-cpu-server.py: fixed factor calculation when base time is 0.0 (#4671)
1 parent 525181c commit cac86ad

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tools/donate-cpu-server.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/
2727
# Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic
2828
# changes)
29-
SERVER_VERSION = "1.3.34"
29+
SERVER_VERSION = "1.3.35"
3030

3131
OLD_VERSION = '2.9'
3232

@@ -750,7 +750,9 @@ def timeReport(resultPath: str, show_gt: bool, query_params: dict) -> str:
750750
if time_base > 0.0 and time_head > 0.0:
751751
time_factor = time_head / time_base
752752
elif time_base == 0.0:
753-
time_factor = time_head
753+
# the smallest possible value is 0.1 so treat that as an increase of 100%
754+
# on top of the existing 100% (treating the base 0.0 as such).
755+
time_factor = 1.0 + (time_head * 10)
754756
else:
755757
time_factor = 0.0
756758
suspicious_time_difference = False

0 commit comments

Comments
 (0)