Skip to content

Commit

Permalink
Refine debug logs of querying extensions (#6414)
Browse files Browse the repository at this point in the history
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.18.x

#### What this PR does / why we need it:

This PR refines debug logs of listing all extensions.

#### Does this PR introduce a user-facing change?

```release-note
None
```
  • Loading branch information
JohnNiang authored Jul 30, 2024
1 parent 0407970 commit 8e8599b
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ public <E extends Extension> Flux<E> listAll(Class<E> type, ListOptions options,
final long startTimeMs = System.currentTimeMillis();
return client.listByNames(storeNames)
.map(extensionStore -> converter.convertFrom(type, extensionStore))
.doOnNext(s -> {
log.debug("Successfully retrieved all by names from db for {} in {}ms",
scheme.groupVersionKind(), System.currentTimeMillis() - startTimeMs);
});
.doOnComplete(() -> log.debug(
"Successfully retrieved all by names from db for {} in {}ms",
scheme.groupVersionKind(), System.currentTimeMillis() - startTimeMs)
);
});
}

Expand All @@ -161,10 +161,10 @@ public <E extends Extension> Mono<ListResult<E>> listBy(Class<E> type, ListOptio
final long startTimeMs = System.currentTimeMillis();
return client.listByNames(storeNames)
.map(extensionStore -> converter.convertFrom(type, extensionStore))
.doOnNext(s -> {
log.debug("Successfully retrieved by names from db for {} in {}ms",
scheme.groupVersionKind(), System.currentTimeMillis() - startTimeMs);
})
.doOnComplete(() -> log.debug(
"Successfully retrieved by names from db for {} in {}ms",
scheme.groupVersionKind(), System.currentTimeMillis() - startTimeMs)
)
.collectList()
.map(result -> new ListResult<>(page.getPageNumber(), page.getPageSize(),
objectKeys.getTotal(), result));
Expand Down

0 comments on commit 8e8599b

Please sign in to comment.