Module org.elasticsearch.server
Package org.elasticsearch.search.profile
Class AbstractInternalProfileTree<PB extends AbstractProfileBreakdown<?>,E>
java.lang.Object
org.elasticsearch.search.profile.AbstractInternalProfileTree<PB,E>
- Direct Known Subclasses:
InternalAggregationProfileTree
public abstract class AbstractInternalProfileTree<PB extends AbstractProfileBreakdown<?>,E>
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract PB
protected abstract String
getDescriptionFromElement
(E element) final PB
getProfileBreakdown
(E query) Returns aQueryProfileBreakdown
for a scoring query.final List
<ProfileResult> getTree()
After the element has been run and profiled, we need to merge the flat timing map with the dependency graph to build a data structure that mirrors the original query treeprotected abstract String
getTypeFromElement
(E element) final void
pollLast()
Removes the last (e.g.
-
Constructor Details
-
AbstractInternalProfileTree
public AbstractInternalProfileTree()
-
-
Method Details
-
getProfileBreakdown
Returns aQueryProfileBreakdown
for a scoring query. Scoring queries (e.g. those that are past the rewrite phase and are now being wrapped by createWeight() ) follow a recursive progression. We can track the dependency tree by a simple stack The only hiccup is that the first scoring query will be identical to the last rewritten query, so we need to take special care to fix that- Parameters:
query
- The scoring query we wish to profile- Returns:
- A ProfileBreakdown for this query
-
createProfileBreakdown
-
pollLast
public final void pollLast()Removes the last (e.g. most recent) value on the stack -
getTree
After the element has been run and profiled, we need to merge the flat timing map with the dependency graph to build a data structure that mirrors the original query tree- Returns:
- a hierarchical representation of the profiled query tree
-
getTypeFromElement
-
getDescriptionFromElement
-