Lines Matching refs:self
17 def __init__(self): argument
18 self.lineNum = 0
19 self.timeStamp = 0
20 self.delta = 0
21 self.deltaDiff = 0
22 self.text = "none"
23 self.textKey = "none"
25 def parse(self, index, line, priorTimeStamp): argument
29 self.lineNum = index
30 self.timeStamp = float(timeString)
31 self.delta = self.timeStamp - priorTimeStamp
32 self.text = words[1][:150]
33 self.textKey = self.text.translate(self.remove_digits)
34 priorTimeStamp = self.timeStamp
35 return self
37 def getTextKey(self): argument
38 textKey = self.textKey
41 def print(self): argument
42 …:8.4f}, D, {: .4f}, DD, ({: .4f}) {}".format(self.lineNum, self.timeStamp, self.delta, self.deltaD…
44 def toString(self): argument
45 …:8.4f}, D, {: .4f}, DD, ({: .4f}) {}".format(self.lineNum, self.timeStamp, self.delta, self.deltaD…
54 def __init__(self): argument
55 self.numItems = 0
56 self.firstTimeStamp = 0
57 self.lastTimeStamp = 0
58 self.deltaSum = 0
59 self.deltaDiffSum = 0
60 self.status = "unknown"
61 self.name = "unknown"
63 def print(self): argument
64 …t(self.name, self.numItems, self.firstTimeStamp, self.lastTimeStamp, (self.lastTimeStamp - self.fi…
66 def add(self, _other): argument
67 if (_other.firstTimeStamp< self.firstTimeStamp):
68 self.firstTimeStamp = _other.firstTimeStamp
70 if (_other.lastTimeStamp > self.lastTimeStamp):
71 self.lastTimeStamp = _other.lastTimeStamp
72 self.deltaSum += _other.deltaSum
79 def __init__(self, _name= ""): argument
80 self.list = []
81 self.name = _name
83 def clear(self): argument
84 self.list.clear()
86 def append(self, item): argument
87 self.list.append(item)
89 def print(self, numItems=None): argument
94 print("List: {}", self.name)
95 for item in self.list:
109 def find(self, word): argument
111 for item in self.list:
115 def findFirst(self, word): argument
116 itemList = self.find(word)
122 def findTextKey(self, textKey): argument
124 for item in self.list:
131 def findItem(self, item): argument
133 return self.findTextKey(textKey)
135 def findExactItem(self, item): argument
137 return self.find(text)
139 def filter(self, startKeyWord, endKeyWord, delta=0): argument
141 startTime = self.findFirst(startKeyWord).timeStamp
142 endTime = self.findFirst(endKeyWord).timeStamp
143 for item in self.list:
149 resultsList.name = self.name
153 def findCommon(self, otherList): argument
155 commonList.name = self.name + "_common"
157 notCommonList.name = self.name + "_notCommon"
160 for item in self.list:
169 …print("FindCommon {} {} {} {}".format(len(self.list), len(otherList.list), numFoundItems, numNotFo…
172 def difference(self, otherList): argument
175 for item in self.list:
188 def analyze(self, checkPeriod = True, includeFirst = True): argument
195 for item in self.list:
215 …print("LogLineList::Analyze() {} ERROR! TimePeriod:{}, CumulativeDelta: {} ".format(self.name, tim…
224 logLineListStats.name = self.name
227 def addList(self, otherList): argument
228 self.list.extend(otherList.list)
229 self.list = sorted(self.list, key=sortByTimeStamp)
234 def __init__(self, _fileName = ""): argument
235 self.logLineList = LogLineList()
237 self.load(_fileName)
239 def loadLines(self, lines): argument
242 logLine = LogLine().parse(index, line, self.priorTimeStamp)
243 self.priorTimeStamp = logLine.timeStamp
247 def load(self, _fileName): argument
248 self.name = _fileName
252 self.logLineList = self.loadLines(lines)
255 print("Error, file '{}' does not exist".format(self.name))
257 def print(self, numItems=None): argument
258 self.logLineList.print(numItems)
263 def __init__(self, _names): argument
264 self.columnNames = _names
265 self.rowColArray = []
266 self.rowSum = []
267 self.rowMax = []
268 self.rowMin = []
269 self.rowStd = []
270 self.rowMedian = []
271 for col in self.columnNames:
272 self.rowSum.append(0)
273 self.rowMax.append(0)
274 self.rowMin.append(sys.maxsize)
275 self.rowStd.append(0)
276 self.rowMedian.append(0)
278 def appendSet(self, values): argument
279 self.rowColArray.append(values)
281 def print(self): argument
283 for words in self.columnNames:
287 for row, values in enumerate(self.rowColArray):
294 for value in self.rowMax:
300 for value in self.rowSum:
305 for value in self.rowMin:
310 for value in self.rowStd:
315 for value in self.rowMedian:
319 def analyze(self): argument
321 numCols = len(self.columnNames)
322 numRows = len(self.rowColArray)
327 for row, values in enumerate(self.rowColArray):
329 self.rowSum[col] += value
330 if value > self.rowMax[col]:
331 self.rowMax[col] = value
332 if value < self.rowMin[col]:
333 self.rowMin[col] = value
339 val = self.rowColArray[row][col]
348 self.rowStd[col] = stdValue
349 self.rowMedian[col] = stdMedian
352 for col, value in enumerate(self.rowSum):
354 self.rowSum[col] = self.rowSum[col] / numRows
356 self.rowSum[col] = 0
362 def __init__(self, _fileName, _keyWords = ["init first", "init second", "boot_completed"]): argument
363 self.fileName = _fileName
364 self.logFile = LogFile(_fileName)
365 self.workingList = []
366 self.keyWords = _keyWords
368 def report(self): argument
370 print("Reporting on '{}'".format(self.fileName))
371 for word in self.keyWords:
372 item = self.logFile.logLineList.findFirst(word)
376 def getMetrics(self, metricsSet): argument
378 for word in self.keyWords:
379 item = self.logFile.logLineList.findFirst(word)
386 def keyWordReport(self, keyword): argument
389 items = self.logFile.logLineList.find(keyword)
407 def __init__(self): argument
408 self.fileName = []
410 def rebootAndRunCmdToFile(self, fileNamePrefix, msgPrefix, Cmd, numTimes, startIndex): argument
449 def getBuildID(self): argument
458 def pullDmesgLogs(self, BuildID, numTimes, startIndex): argument
462 return self.rebootAndRunCmdToFile(fileNamePrefix, msgPrefix, cmd, numTimes, startIndex)
464 def pullLogcatLogs(self, BuildID, numTimes, startIndex): argument
468 return self.rebootAndRunCmdToFile(fileNamePrefix, msgPrefix, cmd, numTimes, startIndex)
470 def runBootAnalyze(self, filename, numTimes, startIndex): argument
483 def pullAll(self): argument
484 BuildID = self.getBuildID()
491 self.pullDmesgLogs(BuildID, 20, 0)
492 self.pullLogcatLogs(BuildID, 2, 0)
493 self.runBootAnalyze(BuildID, 20, 0)
494 self.summaryReportOnDmesgLogFiles(BuildID, 20)
496 def summaryReportOnDmesgLogFiles(self, BuildID, numFiles): argument
523 def rename(self, BuildID1, BuildID2, fileType): argument