+ rows.append(row)
+ return rows
+
+def tunerNumberAnalysis(file, rows):
+ global TUNABLEHEADER
+ tunercount = {}
+ tunernumber = {}
+ for row in rows:
+ mystr=""
+ for i in range(18):
+ mystr+=row[TUNABLEHEADER[i]]
+ if mystr not in tunercount:
+ tunercount.update({mystr : 1})
+ tunernumber.update({mystr : str(row["TUNERNUMBER"])})
+ else :
+ tunercount[mystr] += 1
+ tunernumber[mystr] += "-" + str(row["TUNERNUMBER"])
+
+ problems = set(map(lambda x: x["PROBLEM"], rows))
+ print "Number of repititive tuners"
+ for key in tunercount:
+ if tunercount[key] > 1:
+ print key + "(ids:" + tunernumber[key] + ") = #" + str(tunercount[key])
+
+
+def main():
+ file = open("tuner.csv", "w")
+ rows = analyzeLogs(file)
+ tunerNumberAnalysis(file, rows)