[ML] Add trace logging for when search response is obtained (elastic/x-pack-elasticsearch#3669)
This is useful for understanding performance characteristics as it helps us understand whether the bottleneck is the search part or the analytics part. Relates elastic/x-pack-elasticsearch#3590 Original commit: elastic/x-pack-elasticsearch@dc8c095958
This commit is contained in:
parent
e3da8fa4ae
commit
215f9af1cc
|
@ -99,8 +99,8 @@ class AggregationDataExtractor implements DataExtractor {
|
||||||
|
|
||||||
private Aggregations search() throws IOException {
|
private Aggregations search() throws IOException {
|
||||||
LOGGER.debug("[{}] Executing aggregated search", context.jobId);
|
LOGGER.debug("[{}] Executing aggregated search", context.jobId);
|
||||||
|
|
||||||
SearchResponse searchResponse = executeSearchRequest(buildSearchRequest());
|
SearchResponse searchResponse = executeSearchRequest(buildSearchRequest());
|
||||||
|
LOGGER.debug("[{}] Search response was obtained", context.jobId);
|
||||||
ExtractorUtils.checkSearchWasSuccessful(context.jobId, searchResponse);
|
ExtractorUtils.checkSearchWasSuccessful(context.jobId, searchResponse);
|
||||||
return validateAggs(searchResponse.getAggregations());
|
return validateAggs(searchResponse.getAggregations());
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,6 +117,7 @@ public class ChunkedDataExtractor implements DataExtractor {
|
||||||
.addAggregation(AggregationBuilders.max(LATEST_TIME).field(context.timeField));
|
.addAggregation(AggregationBuilders.max(LATEST_TIME).field(context.timeField));
|
||||||
|
|
||||||
SearchResponse response = executeSearchRequest(searchRequestBuilder);
|
SearchResponse response = executeSearchRequest(searchRequestBuilder);
|
||||||
|
LOGGER.debug("[{}] Data summary response was obtained", context.jobId);
|
||||||
|
|
||||||
ExtractorUtils.checkSearchWasSuccessful(context.jobId, response);
|
ExtractorUtils.checkSearchWasSuccessful(context.jobId, response);
|
||||||
|
|
||||||
|
|
|
@ -95,6 +95,7 @@ class ScrollDataExtractor implements DataExtractor {
|
||||||
protected InputStream initScroll(long startTimestamp) throws IOException {
|
protected InputStream initScroll(long startTimestamp) throws IOException {
|
||||||
LOGGER.debug("[{}] Initializing scroll", context.jobId);
|
LOGGER.debug("[{}] Initializing scroll", context.jobId);
|
||||||
SearchResponse searchResponse = executeSearchRequest(buildSearchRequest(startTimestamp));
|
SearchResponse searchResponse = executeSearchRequest(buildSearchRequest(startTimestamp));
|
||||||
|
LOGGER.debug("[{}] Search response was obtained", context.jobId);
|
||||||
return processSearchResponse(searchResponse);
|
return processSearchResponse(searchResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,6 +196,7 @@ class ScrollDataExtractor implements DataExtractor {
|
||||||
throw searchExecutionException;
|
throw searchExecutionException;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LOGGER.debug("[{}] Search response was obtained", context.jobId);
|
||||||
return processSearchResponse(searchResponse);
|
return processSearchResponse(searchResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue