Module org.elasticsearch.server
Class InternalProfileCollector
java.lang.Object
org.apache.lucene.sandbox.search.ProfilerCollector
org.elasticsearch.search.profile.query.InternalProfileCollector
- All Implemented Interfaces:
org.apache.lucene.search.Collector,TwoPhaseCollector
public class InternalProfileCollector
extends org.apache.lucene.sandbox.search.ProfilerCollector
implements TwoPhaseCollector
This class wraps a Lucene Collector and times the execution of:
- setScorer()
- collect()
- doSetNextReader()
- needsScores()
InternalProfiler facilitates the linking of the Collector graph
-
Constructor Summary
ConstructorsConstructorDescriptionInternalProfileCollector(org.apache.lucene.search.Collector collector, String reason, InternalProfileCollector... children) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringderiveCollectorName(org.apache.lucene.search.Collector c) Creates a human-friendly representation of the Collector name.voidrun post-collection phaseorg.apache.lucene.search.CollectorMethods inherited from class org.apache.lucene.sandbox.search.ProfilerCollector
getLeafCollector, getName, getProfileResult, getReason, getTime, scoreMode, setWeightMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.search.Collector
getLeafCollector, scoreMode, setWeight
-
Constructor Details
-
InternalProfileCollector
public InternalProfileCollector(org.apache.lucene.search.Collector collector, String reason, InternalProfileCollector... children)
-
-
Method Details
-
getWrappedCollector
public org.apache.lucene.search.Collector getWrappedCollector() -
deriveCollectorName
Creates a human-friendly representation of the Collector name.InternalBucket Collectors use the aggregation name in their toString() method, which makes the profiled output a bit nicer.
- Overrides:
deriveCollectorNamein classorg.apache.lucene.sandbox.search.ProfilerCollector- Parameters:
c- The Collector to derive a name from- Returns:
- A (hopefully) prettier name
-
getCollectorTree
-
doPostCollection
Description copied from interface:TwoPhaseCollectorrun post-collection phase- Specified by:
doPostCollectionin interfaceTwoPhaseCollector- Throws:
IOException
-