Class EsqlQueryProfile

java.lang.Object
org.elasticsearch.xpack.esql.action.EsqlQueryProfile
All Implemented Interfaces:
Writeable, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentFragment

public class EsqlQueryProfile extends Object implements Writeable, org.elasticsearch.xcontent.ToXContentFragment
Tracks profiling for the planning phase
  • Field Details

  • Constructor Details

  • Method Details

    • readFrom

      public static EsqlQueryProfile readFrom(StreamInput in) throws IOException
      Throws:
      IOException
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • start

      public EsqlQueryProfile start()
    • stop

      public EsqlQueryProfile stop()
    • total

      public TimeSpanMarker total()
    • planning

      public TimeSpanMarker 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

      public TimeSpanMarker parsing()
      Span for the parsing phase, that covers the ES|QL query parsing
    • viewResolution

      public TimeSpanMarker viewResolution()
      Span for resolving views in the logical plan (between parsing and pre-analysis).
    • preAnalysis

      public TimeSpanMarker preAnalysis()
      Span for the preanalysis phase
    • indicesResolutionMarker

      public TimeSpanMarker indicesResolutionMarker()
    • enrichResolutionMarker

      public TimeSpanMarker enrichResolutionMarker()
    • inferenceResolutionMarker

      public TimeSpanMarker inferenceResolutionMarker()
    • analysis

      public TimeSpanMarker 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()
    • timeSpanMarkers

      public Collection<TimeSpanMarker> timeSpanMarkers()
    • 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 org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException