Performance tests: cleanup performance snapshots from previous tests

A given performance test can do several attempts (BenchmarkTestInfo#attempts).
Every attempt is captured with IJ CPU profiler, and the result is stored in MEASURE123.jfr of WARMUP123.jfr.
We need to clean up all these snapshots when starting a new test, otherwise the snapshots from prev runs with a big index will be shown as artifacts of the consequent runs with fewer number of attempts.

GitOrigin-RevId: 466a8c272c2b0c8e29aaf18b7f63ddf2c61ae783
This commit is contained in:
Max Medvedev
2025-02-15 14:32:35 +01:00
committed by intellij-monorepo-bot
parent ad18944e3e
commit b7aea93f13

View File

@@ -117,7 +117,8 @@ public class BenchmarkTestInfoImpl implements BenchmarkTestInfo {
logDirChildren.filter(child -> {
String name = child.toString();
return name.contains("-metrics")
|| name.contains("-meters");
|| name.contains("-meters")
|| name.endsWith(".jfr");
})
.forEach(childToRemove -> {
try {