jps: log only builders that do something noticeable
authorpeter <peter@jetbrains.com>
Fri, 20 Feb 2015 06:54:42 +0000 (07:54 +0100)
committerpeter <peter@jetbrains.com>
Fri, 20 Feb 2015 06:58:58 +0000 (07:58 +0100)
jps/jps-builders/src/org/jetbrains/jps/cmdline/BuildSession.java

index a9e2be40d76dff832f85ac76a63863ad16adb74b..95116641dcece302be5615aa4c5ec642cda8b3a7 100644 (file)
@@ -154,7 +154,11 @@ final class BuildSession implements Runnable, CanceledStatus {
           }
           else if (buildMessage instanceof BuilderStatisticsMessage) {
             BuilderStatisticsMessage message = (BuilderStatisticsMessage)buildMessage;
-            LOG.info("Build duration: '" + message.getBuilderName() + "' builder took " + message.getElapsedTimeMs() + " ms, " + message.getNumberOfProcessedSources() + " sources processed");
+            int srcCount = message.getNumberOfProcessedSources();
+            long time = message.getElapsedTimeMs();
+            if (srcCount != 0 || time > 50) {
+              LOG.info("Build duration: '" + message.getBuilderName() + "' builder took " + time + " ms, " + srcCount + " sources processed");
+            }
             response = null;
           }
           else if (!(buildMessage instanceof BuildingTargetProgressMessage)) {