Added RR and WW Miss

This commit is contained in:
Matthias Jung
2020-12-02 10:00:15 +01:00
parent 9355e03012
commit e9ccfaade7

View File

@@ -208,10 +208,6 @@ def delayed_reasons(connection):
SELECT
a.ID AS gapBeginID,
b.ID AS gapEndID,
a.Row AS gapBeginRow,
b.Row AS gapEndRow,
a.Bank AS gapBeginBank,
b.Bank AS gapEndBank,
a.Command AS gapBeginCommand,
b.Command AS gapEndCommand
FROM
@@ -248,6 +244,34 @@ def delayed_reasons(connection):
cursor.execute(query)
WR = cursor.fetchone()[0]
# Count RR Miss
query = """
SELECT
COUNT(*)
FROM delayedDataBusGaps d, Phases p
WHERE
d.gapBeginCommand = "R" AND
d.gapEndCommand = "R" AND
p.Transact = d.gapEndID AND
PhaseName = "ACT";
""";
cursor.execute(query)
RRM = cursor.fetchone()[0]
# Count WW Miss
query = """
SELECT
COUNT(*)
FROM delayedDataBusGaps d, Phases p
WHERE
d.gapBeginCommand = "W" AND
d.gapEndCommand = "W" AND
p.Transact = d.gapEndID AND
PhaseName = "ACT";
""";
cursor.execute(query)
WWM = cursor.fetchone()[0]
# Count All Gaps
query = """
SELECT
@@ -256,13 +280,15 @@ def delayed_reasons(connection):
""";
cursor.execute(query)
total = cursor.fetchone()[0]
other = total - RW - WR
other = total - RW - WR - RRM - WWM
RW /= total / 100.0
WR /= total / 100.0
RRM /= total / 100.0
WWM /= total / 100.0
other /= total / 100.0
result = "RW: {}, WR: {}, Other: {}".format(RW, WR, other);
result = "RW: {}, WR: {}, RRM: {}, WWM: {}, Other: {}".format(RW, WR, RRM, WWM, other);
return result
@metric