report EDT activity for slow EDT actions 2

GitOrigin-RevId: 96124815091ca7106cc8c7e4f8954be545f944cc
This commit is contained in:
Gregory.Shrago
2022-08-15 17:29:03 +00:00
committed by intellij-monorepo-bot
parent e7662c2c1f
commit 05e3463f19
@@ -232,10 +232,17 @@ final class ActionUpdater {
}
if (myCurEDTPerformMillis > 200) {
Throwable throwable = new Throwable(elapsedReport(myCurEDTPerformMillis, true, operationName) + OLD_EDT_MSG_SUFFIX);
for (Throwable trace : Objects.requireNonNullElse(edtTracesRef.get(), FList.<Throwable>emptyList())) {
throwable.addSuppressed(trace);
FList<Throwable> edtTraces = edtTracesRef.get();
// do not report pauses without EDT traces (e.g. due to debugging)
if (edtTraces != null && edtTraces.size() > 0) {
for (Throwable trace : edtTraces) {
throwable.addSuppressed(trace);
}
LOG.error(throwable);
}
else {
LOG.warn(throwable);
}
LOG.error(throwable);
}
myCurEDTWaitMillis = myCurEDTPerformMillis = 0L;
}