Crude fix for bandwidth calculations with pseudo-channels

This commit is contained in:
2024-11-15 15:56:33 +01:00
parent ba0d0165e8
commit e74a617273
2 changed files with 10 additions and 3 deletions

View File

@@ -506,11 +506,13 @@ def memory_utilisation_in_Gibps_without_idle(connection):
def memory_utilisation_percent_including_idle(connection):
cursor = connection.cursor()
cursor.execute("""SELECT SUM(DataStrobeEnd - DataStrobeBegin) FROM Phases""")
active = cursor.fetchone()
active = cursor.fetchone()[0]
if getPseudoChannelMode(connection):
active /= 2
cursor = connection.cursor()
cursor.execute("""SELECT MAX(DataStrobeEnd) FROM Phases""")
total = cursor.fetchone()
return (active[0] / total[0]) * 100
total = cursor.fetchone()[0]
return (active / total) * 100
# def refreshMissDecision(connection, calculatedMetrics):