Class ProfileResult

java.lang.Object
org.elasticsearch.search.profile.ProfileResult
All Implemented Interfaces:
Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject

public final class ProfileResult extends Object implements Writeable, org.elasticsearch.common.xcontent.ToXContentObject
This class is the internal representation of a profiled Query, corresponding to a single node in the query tree. It is built after the query has finished executing and is merely a structured representation, rather than the entity that collects the timing profile (see InternalProfiler for that)

Each InternalProfileResult has a List of InternalProfileResults, which will contain "children" queries if applicable

  • Constructor Details

  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • getLuceneDescription

      public String getLuceneDescription()
      Retrieve the lucene description of this query (e.g. the "explain" text)
    • getQueryName

      public String getQueryName()
      Retrieve the name of the entry (e.g. "TermQuery" or "LongTermsAggregator")
    • getTimeBreakdown

      public Map<String,Long> getTimeBreakdown()
      The timing breakdown for this node.
    • getDebugInfo

      public Map<String,Object> getDebugInfo()
      The debug information about the profiled execution.
    • getTime

      public long getTime()
      Returns the total time (inclusive of children) for this query node.
      Returns:
      elapsed time in nanoseconds
    • getProfiledChildren

      public List<ProfileResult> getProfiledChildren()
      Returns a list of all profiled children queries
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      IOException
    • fromXContent

      public static ProfileResult fromXContent(org.elasticsearch.common.xcontent.XContentParser p) throws IOException
      Throws:
      IOException