Refine debug logs of querying extensions (#6414)

#### 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
```
pull/6417/head
John Niang 2024-07-30 17:11:57 +08:00 committed by GitHub
parent 0407970664
commit 8e8599b3c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 8 deletions

View File

@ -140,10 +140,10 @@ public class ReactiveExtensionClientImpl implements ReactiveExtensionClient {
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)
);
});
}
@ -161,10 +161,10 @@ public class ReactiveExtensionClientImpl implements ReactiveExtensionClient {
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));