diff --git a/lib-extra/build.gradle b/lib-extra/build.gradle index 82605dba05..ac0328a501 100644 --- a/lib-extra/build.gradle +++ b/lib-extra/build.gradle @@ -4,8 +4,6 @@ apply from: rootProject.file('gradle/java-setup.gradle') apply from: rootProject.file('gradle/java-publish.gradle') dependencies { - // temporary, for profiling - compile 'com.diffplug.durian:durian-debug:1.0.0' compile project(':lib') // misc useful utilities compile "com.diffplug.durian:durian-core:${VER_DURIAN}" diff --git a/lib/build.gradle b/lib/build.gradle index dd8af7641b..a58e735602 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -4,8 +4,6 @@ apply from: rootProject.file('gradle/java-setup.gradle') apply from: rootProject.file('gradle/java-publish.gradle') dependencies { - // temporary, for profiling - compile 'com.diffplug.durian:durian-debug:1.0.0' // zero runtime reqs is a hard requirements for spotless-lib // if you need a dep, put it in lib-extra testCompile "junit:junit:${VER_JUNIT}" diff --git a/lib/src/main/java/com/diffplug/spotless/Formatter.java b/lib/src/main/java/com/diffplug/spotless/Formatter.java index b480aa2ede..e76c96ef2e 100644 --- a/lib/src/main/java/com/diffplug/spotless/Formatter.java +++ b/lib/src/main/java/com/diffplug/spotless/Formatter.java @@ -30,13 +30,8 @@ import javax.annotation.Nullable; -import com.diffplug.common.debug.LapTimer; -import com.diffplug.common.debug.StepProfiler; - /** Formatter which performs the full formatting. */ public final class Formatter { - public static final StepProfiler PROFILER = new StepProfiler(LapTimer.createNanoWrap2Sec()); - private final LineEnding.Policy lineEndingsPolicy; private final Charset encoding; private final Path rootDir; diff --git a/lib/src/main/java/com/diffplug/spotless/FormatterStepImpl.java b/lib/src/main/java/com/diffplug/spotless/FormatterStepImpl.java index d4f1ff7ba4..d9ae3513f1 100644 --- a/lib/src/main/java/com/diffplug/spotless/FormatterStepImpl.java +++ b/lib/src/main/java/com/diffplug/spotless/FormatterStepImpl.java @@ -53,12 +53,7 @@ public String getName() { @Override protected State calculateState() throws Exception { - try { - Formatter.PROFILER.startStep(name + " calculateKey"); - return stateSupplier.get(); - } finally { - Formatter.PROFILER.finish(); - } + return stateSupplier.get(); } static final class Standard extends FormatterStepImpl { @@ -75,16 +70,9 @@ static final class Standard extends FormatterStepImp @Override protected String format(State state, String rawUnix, File file) throws Exception { if (formatter == null) { - Formatter.PROFILER.startStep(name + " createFormatter"); formatter = stateToFormatter.apply(state()); - Formatter.PROFILER.finish(); - } - try { - Formatter.PROFILER.startStep(name + " apply"); - return formatter.apply(rawUnix); - } finally { - Formatter.PROFILER.finish(); } + return formatter.apply(rawUnix); } } @@ -102,24 +90,15 @@ static class Closeable extends FormatterStepImpl> allGroups = new ArrayList<>(); Box> currentGroup = Box.of(new ArrayList<>()); API api = new API() { @Override public void assertThis() { - PROFILER.startStep("create"); currentGroup.get().add(create()); - PROFILER.finish(); } @Override @@ -70,9 +64,6 @@ public void areDifferentThan() { for (List step : allGroups) { tester.addEqualityGroup(step.toArray()); } - PROFILER.startStep("equals"); tester.testEquals(); - PROFILER.finish(); - PROFILER.printResults(); } }