Add timing information about local file discovery 98/92198/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 20 Aug 2020 07:41:39 +0000 (09:41 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 20 Aug 2020 07:42:40 +0000 (09:42 +0200)
Locating local files actually requires also pasing them to establish
their SourceIdentifier. Add output to establish timing of this step.

Change-Id: I7dec307a4ee8b5b394a929f6ce8cb63229f94485
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-maven-plugin/src/main/java/org/opendaylight/yangtools/yang2sources/plugin/YangToSourcesProcessor.java

index 4490cccb03e9bcabac9d12e70eb252836f9959d9..72ed01e62880114f2e87bbcda218924b23c01f66 100644 (file)
@@ -260,6 +260,7 @@ class YangToSourcesProcessor {
              * Check if any of the listed files changed. If no changes occurred,
              * simply return null, which indicates and of execution.
              */
+            final Stopwatch watch = Stopwatch.createStarted();
             if (!allFiles.stream().anyMatch(buildContext::hasDelta)) {
                 LOG.info("{} None of {} input files changed", LOG_PREFIX, allFiles.size());
                 return Optional.empty();
@@ -295,7 +296,7 @@ class YangToSourcesProcessor {
             }
 
             LOG.debug("Found project files: {}", yangFilesInProject);
-            LOG.info("{} Project model files found: {}", LOG_PREFIX, yangFilesInProject.size());
+            LOG.info("{} Project model files found: {} in {}", LOG_PREFIX, yangFilesInProject.size(), watch);
 
             final ProcessorModuleReactor reactor = new ProcessorModuleReactor(parser, sourcesInProject, dependencies);
             LOG.debug("Initialized reactor {} with {}", reactor, yangFilesInProject);