From bc71233ed1d091456a97ce653c1f4fe24aac9997 Mon Sep 17 00:00:00 2001 From: "Egor.Ushakov" Date: Thu, 3 Nov 2016 12:33:21 +0300 Subject: [PATCH] dump timings if debug log enabled --- .../intellij/debugger/ui/breakpoints/MethodBreakpoint.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/MethodBreakpoint.java b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/MethodBreakpoint.java index abe3fd51fc70..41cc35a2d621 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/MethodBreakpoint.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/MethodBreakpoint.java @@ -517,8 +517,15 @@ public class MethodBreakpoint extends BreakpointWithHighlighter consumer) { + long start = 0; + if (LOG.isDebugEnabled()) { + start = System.currentTimeMillis(); + } MultiMap inheritance = new MultiMap<>(); classType.virtualMachine().allClasses().forEach(type -> supertypes(type).forEach(st -> inheritance.putValue(st, type))); StreamEx.ofTree(classType, t -> StreamEx.of(inheritance.get(t))).forEach(consumer); + if (LOG.isDebugEnabled()) { + LOG.debug("Processing all classes took: " + String.valueOf(System.currentTimeMillis() - start) + "ms"); + } } }