Skip to content

Commit

Permalink
log time taken to create knative service
Browse files Browse the repository at this point in the history
  • Loading branch information
artsiomkorzun committed Jan 30, 2025
1 parent 9839ce2 commit f00cdcd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ public void onSuccess(V1Status state, int i, Map<String, List<String>> map) {

public Mono<String> createKnativeService(String namespace, V1Service service, int serviceSetupTimeoutSec) {
// Currently there is no asynchronous Watch api
long startTime = System.currentTimeMillis();
return Mono.fromCallable(() -> {
String name = service.getMetadata().getName();
ServiceVersion version = ServiceVersion.parse(service.getApiVersion());
Expand All @@ -248,7 +249,7 @@ public Mono<String> createKnativeService(String namespace, V1Service service, in
Validate.isTrue(name.equals(serviceState.getMetadata().getName()));
String url = KubernetesUtils.extractServiceUrl(serviceState);
if (url != null) {
log.info("Service {} has been set up", name);
log.info("Service {} has been set up: {} ms", name, System.currentTimeMillis() - startTime);
return url;
}
} else {
Expand Down

0 comments on commit f00cdcd

Please sign in to comment.