def __doHourlySrcCount(self, foldername): files = batchFileReader(foldername, cookie=self.date) srcCounter = Counter() for line in files: srcIP = line.split("\t")[FieldToLoc["srcIP"]] srcCounter[srcIP] += 1 return srcCounter
def doDailySrcCount(foldername, date): files = batchFileReader(foldername, cookie=date) srcCounter = Counter() for line in files: srcIP = line.split("\t")[FieldToLoc["srcIP"]] srcCounter[srcIP] += 1 return srcCounter
def __doHourlyTypeCount( self, folderType, ): files = batchFileReader(folderType, cookie=self.date) srcCounter = Counter() for line in files: type = line.split("\t")[FieldToLoc["type"]] srcCounter[type] += 1 return srcCounter
def __doHourlyNameCount( self, foldername, ): files = batchFileReader(foldername, cookie=self.date) srcCounter = Counter() for line in files: name = line.split("\t")[FieldToLoc["query"]] srcCounter[name] += 1 return srcCounter
def __doHourlyCount(self, foldername): files = batchFileReader(foldername, cookie=self.date) filterCounter = Counter() for line in files: if self.filterField is None or line.split("\t")[FieldToLoc[ self.filterField]] != self.filterVal: continue else: name = line.split("\t")[FieldToLoc[self.toField]] filterCounter[name] += 1 return filterCounter