Class EsqlQueryProfile
java.lang.Object
org.elasticsearch.xpack.esql.action.EsqlQueryProfile
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentFragment
Tracks profiling for the planning phase
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionEsqlQueryProfile(TimeSpan query, TimeSpan planning, TimeSpan parsing, TimeSpan viewResolution, TimeSpan datasetResolution, TimeSpan preAnalysis, TimeSpan indicesResolution, TimeSpan enrichResolution, TimeSpan inferenceResolution, TimeSpan analysis, int fieldCapsCalls, int filesScanned, int splitsScanned, long bytesScanned, UnmappedResolution unmappedResolution, int externalWarmAggregates) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExternalScanStats(int files, int splits, long bytes) Records the post-prune external scan accounting discovered for the query.voidaddExternalWarmAggregates(int count) Records thatcountexternal relations were served warm — their ungrouped aggregate was answered from canonical-stripe / whole-file statistics with the data scan short-circuited away.analysis()Span for the plan analysis phase - this does not include plan optimizations, which come later and are part of each individual plan profilinglongSpan for rewriting datasets in the logical plan (between view resolution and pre-analysis).booleanintintintinthashCode()voidparsing()Span for the parsing phase, that covers the ES|QL query parsingplanning()Span for the ES|QL "planning" phase - when it is complete, query execution (in ComputeService) is about to start.Span for the preanalysis phasestatic EsqlQueryProfilereadFrom(StreamInput in) voidsetUnmappedResolution(UnmappedResolution unmappedResolution) intstart()stop()voidSafely stops all markers that were started but not yet stopped.toString()total()toXContent(XContentBuilder builder, ToXContent.Params params) Span for resolving views in the logical plan (between parsing and pre-analysis).voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
QUERY
- See Also:
-
PLANNING
- See Also:
-
PARSING
- See Also:
-
VIEW_RESOLUTION
- See Also:
-
DATASET_RESOLUTION
- See Also:
-
PRE_ANALYSIS
- See Also:
-
INDICES_RESOLUTION
- See Also:
-
ENRICH_RESOLUTION
- See Also:
-
INFERENCE_RESOLUTION
- See Also:
-
ANALYSIS
- See Also:
-
-
Constructor Details
-
EsqlQueryProfile
public EsqlQueryProfile() -
EsqlQueryProfile
public EsqlQueryProfile(TimeSpan query, TimeSpan planning, TimeSpan parsing, TimeSpan viewResolution, TimeSpan datasetResolution, TimeSpan preAnalysis, TimeSpan indicesResolution, TimeSpan enrichResolution, TimeSpan inferenceResolution, TimeSpan analysis, int fieldCapsCalls, int filesScanned, int splitsScanned, long bytesScanned, UnmappedResolution unmappedResolution, int externalWarmAggregates)
-
-
Method Details
-
readFrom
- Throws:
IOException
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-
start
-
stop
-
total
-
planning
Span for the ES|QL "planning" phase - when it is complete, query execution (in ComputeService) is about to start. Note this is currently only built for a single phase planning/execution model. When INLINE STATS moves towards GA we may need to revisit this model. Currently, it should never be called more than once. -
parsing
Span for the parsing phase, that covers the ES|QL query parsing -
viewResolution
Span for resolving views in the logical plan (between parsing and pre-analysis). -
datasetResolution
Span for rewriting datasets in the logical plan (between view resolution and pre-analysis). -
preAnalysis
Span for the preanalysis phase -
indicesResolutionMarker
-
enrichResolutionMarker
-
inferenceResolutionMarker
-
analysis
Span for the plan analysis phase - this does not include plan optimizations, which come later and are part of each individual plan profiling -
fieldCapsCalls
public int fieldCapsCalls() -
incFieldCapsCalls
public void incFieldCapsCalls() -
filesScanned
public int filesScanned() -
splitsScanned
public int splitsScanned() -
bytesScanned
public long bytesScanned() -
externalWarmAggregates
public int externalWarmAggregates() -
addExternalScanStats
public void addExternalScanStats(int files, int splits, long bytes) Records the post-prune external scan accounting discovered for the query. Adds to any previously recorded counts so multiple split-discovery paths can contribute. -
addExternalWarmAggregates
public void addExternalWarmAggregates(int count) Records thatcountexternal relations were served warm — their ungrouped aggregate was answered from canonical-stripe / whole-file statistics with the data scan short-circuited away. Recorded at split-discovery time on the coordinator, where the short-circuit decision is made (seeComputeService.canSkipSplitDiscovery); no scan operator runs for a warm relation, so this is the only place the "served from stripes" signal is observable. -
timeSpanMarkers
-
setUnmappedResolution
-
unmappedResolution
-
stopAllStartedMarkers
public void stopAllStartedMarkers()Safely stops all markers that were started but not yet stopped. This is useful in error paths where we need to ensure all timing data is captured. -
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-