From 381761f0fa2df598559362bae7ff7f9d10a6e02a Mon Sep 17 00:00:00 2001 From: Ana Mativi Date: Fri, 6 Oct 2017 15:16:29 +0200 Subject: [PATCH] Adding number of refreshes to metrics This new metric was implemented by Ana Mativi and then removed by mistake in 14c4a041bd4831f55dc8e2e6dbe38076f7cfe94e. --- DRAMSys/traceAnalyzer/scripts/metrics.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/DRAMSys/traceAnalyzer/scripts/metrics.py b/DRAMSys/traceAnalyzer/scripts/metrics.py index f62084d6..24bf8e1e 100644 --- a/DRAMSys/traceAnalyzer/scripts/metrics.py +++ b/DRAMSys/traceAnalyzer/scripts/metrics.py @@ -228,6 +228,14 @@ def number_of_accesses(connection): return result[0] +@metric +def number_of_refreshes(connection): + cursor = connection.cursor() + cursor.execute("SELECT COUNT(*) FROM Phases WHERE PhaseName = 'REFA'") + result = cursor.fetchone() + return result[0] + + @metric def bank_overlap_ratio(connection): # Calculates how many banks are open in parallel