Skip to content

Commit 5b6a673

Browse files
committed
nightly: grr remove old log files to clean up after failed run so next run doesn't cascade fail
1 parent 42ac2e7 commit 5b6a673

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/python/nightlyBench.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ def buildIndex(r, runLogDir, desc, index, logFile):
146146
indexPath = benchUtil.nameToIndexPath(index.getName())
147147
if os.path.exists(indexPath):
148148
shutil.rmtree(indexPath)
149+
150+
# clean up after any failed runs first:
151+
for tool in ("vmstat", "top"):
152+
logFileName = f"{constants.LOGS_DIR}/nightly.{tool}.log"
153+
if os.path.exists(logFileName):
154+
os.remove(logFileName)
155+
149156
# aggregate at multiple stack depths so we can see patterns like "new BytesRef() is costly regardless of context", for example:
150157
indexPath, fullLogFile, profilerResults, jfrFile = r.makeIndex("nightly", index, profilerCount=50, profilerStackSize=JFR_STACK_SIZES)
151158

0 commit comments

Comments
 (0)