Log time use when building models (debug log)
@@ -23,6 +23,7 @@ import com.yahoo.vespa.config.server.provision.HostProvisionerProvider;
import com.yahoo.vespa.config.server.provision.ProvisionerAdapter;
import com.yahoo.vespa.config.server.provision.StaticProvisioner;
+import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Collections;
@@ -79,6 +80,7 @@ public abstract class ModelsBuilder<MODELRESULT extends ModelResult> {
ApplicationPackage applicationPackage,
SettableOptional<AllocatedHosts> allocatedHosts,
Instant now) {
+ Instant start = Instant.now();
log.log(Level.FINE, "Will build models for " + applicationId);
Set<Version> versions = modelFactoryRegistry.allVersions();
@@ -135,7 +137,8 @@ public abstract class ModelsBuilder<MODELRESULT extends ModelResult> {
allApplicationModels.stream()
.map(result -> result.getModel().version())
.map(Version::toFullString)
- .collect(Collectors.toSet())) ;
+ .collect(Collectors.toSet()) +
+ " in " + Duration.between(start, Instant.now()));
return allApplicationModels;
}
