QueryProfilerResult (Lucene 10.5.0 sandbox API)
Description: declaration: package: org.apache.lucene.sandbox.search, class: QueryProfilerResult

Package org.apache.lucene.sandbox.search

# Class QueryProfilerResult

java.lang.Object
org.apache.lucene.sandbox.search.QueryProfilerResult

public class QueryProfilerResult extends Object
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.

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `QueryProfilerResult(String type, String description, Map<String,Long> queryBreakdowns, List<AggregatedQueryLeafProfilerResult> aggregatedQueryLeafBreakdowns, List<QueryProfilerResult> childrenProfileResults, long startTime, long totalTime)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<AggregatedQueryLeafProfilerResult>`
  `getAggregatedQueryLeafBreakdowns()`
  `String`
  `getDescription()`
  Retrieve the lucene description of this query (e.g.
  `List<QueryProfilerResult>`
  `getProfiledChildren()`
  Returns a list of all profiled children queries
  `String`
  `getQueryName()`
  Retrieve the name of the entry (e.g.
  `long`
  `getStartTime()`
  `Map<String,Long>`
  `getTimeBreakdown()`
  The timing breakdown for this node.
  `long`
  `getTotalTime()`
  Returns the total time (inclusive of children) for this query node.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### QueryProfilerResult

    public QueryProfilerResult(String type, String description, Map<String,Long> queryBreakdowns, List<AggregatedQueryLeafProfilerResult> aggregatedQueryLeafBreakdowns, List<QueryProfilerResult> childrenProfileResults, long startTime, long totalTime)

- ## Method Details

  - ### getQueryName

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

  - ### getDescription

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

  - ### getTimeBreakdown

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

  - ### getStartTime

    public long getStartTime()

  - ### getTotalTime

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

  - ### getAggregatedQueryLeafBreakdowns

    public List<AggregatedQueryLeafProfilerResult> getAggregatedQueryLeafBreakdowns()

  - ### getProfiledChildren

    public List<QueryProfilerResult> getProfiledChildren()
    Returns a list of all profiled children queries