Fix getThreads() in metrics script.
Bug introduced by pull request #191. https://git.rhrk.uni-kl.de/EIT-Wehn/dram.vp.system/pull/191 Tests with refresh disabled made the bug evident.
This commit is contained in:
@@ -90,3 +90,9 @@ def getMaxRefBurst(connection):
|
||||
cursor.execute(" SELECT MaxRefBurst FROM GeneralInfo ")
|
||||
result = cursor.fetchone()
|
||||
return result[0]
|
||||
|
||||
def getControllerThread(connection):
|
||||
cursor = connection.cursor()
|
||||
cursor.execute("SELECT ControllerThread FROM GeneralInfo")
|
||||
result = cursor.fetchone()
|
||||
return result[0]
|
||||
|
||||
@@ -18,8 +18,10 @@ def threadMetric(function):
|
||||
|
||||
|
||||
def getThreads(connection):
|
||||
cthread = getControllerThread(connection)
|
||||
cursor = connection.cursor()
|
||||
cursor.execute("SELECT DISTINCT(TThread) FROM transactions WHERE TThread != 0 ORDER BY TThread")
|
||||
query = "SELECT DISTINCT(TThread) FROM transactions WHERE TThread != " + str(cthread) + " ORDER BY TThread"
|
||||
cursor.execute(query)
|
||||
result = []
|
||||
for currentRow in cursor:
|
||||
result.append(currentRow[0])
|
||||
|
||||
Reference in New Issue
Block a user