Cap time until full at 1E9 seconds

This commit is contained in:
Peter J. Holzer 2024-09-07 15:13:42 +02:00
parent 001d03790d
commit 33327258d1
1 changed files with 1 additions and 0 deletions

View File

@ -76,6 +76,7 @@ class DiskFullPredictor:
future_growth = current_usable_bytes / current_used_bytes future_growth = current_usable_bytes / current_used_bytes
tuf = math.log(future_growth) / math.log(historic_growth) * (now - lts.data[first_i][0]) tuf = math.log(future_growth) / math.log(historic_growth) * (now - lts.data[first_i][0])
tuf = max(tuf, now - lts.data[first_i][0]) tuf = max(tuf, now - lts.data[first_i][0])
tuf = min(tuf, 1E9)
desc = {**lts.description, desc = {**lts.description,
"measure": "time_until_disk_full", "measure": "time_until_disk_full",
"node": node, "node": node,