Package org.apache.lucene.sandbox.search
Class QueryProfilerResult
- java.lang.Object
-
- org.apache.lucene.sandbox.search.QueryProfilerResult
-
public class QueryProfilerResult extends java.lang.ObjectThis 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
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.Long>breakdownprivate java.util.List<QueryProfilerResult>childrenprivate java.lang.Stringdescriptionprivate longtotalTimeprivate java.lang.Stringtype
-
Constructor Summary
Constructors Constructor Description QueryProfilerResult(java.lang.String type, java.lang.String description, java.util.Map<java.lang.String,java.lang.Long> breakdown, long totalTime, java.util.List<QueryProfilerResult> children)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()Retrieve the lucene description of this query (e.g.java.util.List<QueryProfilerResult>getProfiledChildren()Returns a list of all profiled children queriesjava.lang.StringgetQueryName()Retrieve the name of the entry (e.g.java.util.Map<java.lang.String,java.lang.Long>getTimeBreakdown()The timing breakdown for this node.longgetTotalTime()Returns the total time (inclusive of children) for this query node.
-
-
-
Field Detail
-
type
private final java.lang.String type
-
description
private final java.lang.String description
-
breakdown
private final java.util.Map<java.lang.String,java.lang.Long> breakdown
-
totalTime
private final long totalTime
-
children
private final java.util.List<QueryProfilerResult> children
-
-
Constructor Detail
-
QueryProfilerResult
public QueryProfilerResult(java.lang.String type, java.lang.String description, java.util.Map<java.lang.String,java.lang.Long> breakdown, long totalTime, java.util.List<QueryProfilerResult> children)
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Retrieve the lucene description of this query (e.g. the "explain" text)
-
getQueryName
public java.lang.String getQueryName()
Retrieve the name of the entry (e.g. "TermQuery" or "LongTermsAggregator")
-
getTimeBreakdown
public java.util.Map<java.lang.String,java.lang.Long> getTimeBreakdown()
The timing breakdown for this node.
-
getTotalTime
public long getTotalTime()
Returns the total time (inclusive of children) for this query node.- Returns:
- elapsed time in nanoseconds
-
getProfiledChildren
public java.util.List<QueryProfilerResult> getProfiledChildren()
Returns a list of all profiled children queries
-
-