Removing unused import and code
This commit is contained in:
@@ -2,7 +2,6 @@ import sys
|
||||
import sqlite3
|
||||
from memUtil import *
|
||||
from math import *
|
||||
from intervaltree import Interval, IntervalTree
|
||||
|
||||
metrics = []
|
||||
threadMetrics = []
|
||||
@@ -220,19 +219,6 @@ def number_of_accesses(connection):
|
||||
return result[0]
|
||||
|
||||
|
||||
@metric
|
||||
def bank_usage_ratio(connection):
|
||||
# Calculates how many percent of the accesses go to which bank...
|
||||
cursor = connection.cursor()
|
||||
bankAccess = []
|
||||
total = number_of_accesses(connection)
|
||||
for bank in range(getNumberOfBanks(connection)):
|
||||
cursor.execute("SELECT COUNT(*) FROM Transactions where TBank = {}".format(bank))
|
||||
r = cursor.fetchone()
|
||||
bankAccess.append(round((float(r[0]) / float(total)) * 100.0, 2))
|
||||
|
||||
return ",".join(format(x, "6.2f") for x in bankAccess)
|
||||
|
||||
@metric
|
||||
def bank_overlap_ratio(connection):
|
||||
# Calculates how many banks are open in parallel
|
||||
|
||||
Reference in New Issue
Block a user