From dc96ffd052adf09349ef00cc11d0c94e965cd26c Mon Sep 17 00:00:00 2001 From: Matthias Jung Date: Mon, 4 Aug 2014 13:02:52 +0200 Subject: [PATCH] metrics: memory utilization --- dram/resources/scripts/metrics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dram/resources/scripts/metrics.py b/dram/resources/scripts/metrics.py index 8f448db1..dfcf491a 100644 --- a/dram/resources/scripts/metrics.py +++ b/dram/resources/scripts/metrics.py @@ -60,14 +60,14 @@ def average_response_latency_in_ns(connection): return round(result[0],1) @metric -def memory_utilisation(connection): +def memory_utilisation_percent(connection): cursor = connection.cursor() cursor.execute(""" SELECT sum(DataStrobeEnd - DataStrobeBegin) FROM transactions """) active = cursor.fetchone() cursor = connection.cursor() cursor.execute(""" SELECT max(DataStrobeEnd) FROM Transactions """) total = cursor.fetchone() - return str(active[0]/total[0]*100)+"%" + return (active[0]/total[0])*100 def refreshMissDecision(connection,calculatedMetrics):