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 String
deriveCollectorName
(org.apache.lucene.search.Collector c) Creates a human-friendly representation of the Collector name.void
run post-collection phaseorg.apache.lucene.search.Collector
Methods inherited from class org.apache.lucene.sandbox.search.ProfilerCollector
getLeafCollector, getName, getProfileResult, getReason, getTime, scoreMode, setWeight
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
deriveCollectorName
in 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:TwoPhaseCollector
run post-collection phase- Specified by:
doPostCollection
in interfaceTwoPhaseCollector
- Throws:
IOException
-