Commit 63d03ff2 authored by lkx33's avatar lkx33

Initial commit

parent bb589b5c
import os
from analyzer import formatData
logData = formatData(1)
time = [[i[1],i[5]] for i in logData]
# lag = [i[5] for i in logData]
print(time[:100])
# logData = formatData(1)
# time = [[i[1],i[5]] for i in logData]
# # lag = [i[5] for i in logData]
# print(time[:100])
# with open("./log/test.log", 'w') as f:
# f.write("www.runoob.com!\nVery good site!\n" + '\n')
# f.write("www.runoob.com!\nVery good site!\n" + '\n')
def fileSearch(folderName="", keyword="msg"):
filePath = os.path.join(f'./log', folderName)
fileList = os.listdir(filePath)
msgList = [i for i in fileList if keyword in i]
data=[]
print(msgList)
for i in msgList:
with open(os.path.join(f'./log/{folderName}/', i)) as f:
for line in f:
# line = line.strip('\n')
data.append(line)
return data
fileSearch('log(n=1000,m=100)2021_05_14_18_02_38')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment