Skip to content

Commit

Permalink
Optimizing log loss time while reading trace file
Browse files Browse the repository at this point in the history
  • Loading branch information
peace.lee committed Jun 1, 2017
1 parent ceff6d6 commit dd2593f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion guider.py
Original file line number Diff line number Diff line change
Expand Up @@ -12554,6 +12554,11 @@ def printMemAnalysis():
def getInitTime(file):
systemInfoBuffer = ''

if SystemManager.isRecordMode():
nrLine = SystemManager.pageSize
else:
nrLine = 0

while 1:
start = end = -1
buf = None
Expand All @@ -12563,7 +12568,7 @@ def getInitTime(file):

try:
with open(file, 'r') as fd:
buf = fd.readlines()
buf = fd.readlines(nrLine)
except IOError:
SystemManager.printError("Fail to open %s" % file)
sys.exit(0)
Expand Down

0 comments on commit dd2593f

Please sign in to comment.