Package org.apache.lucene.sandbox.search
Class ProfilerCollector
java.lang.Object
org.apache.lucene.sandbox.search.ProfilerCollector
- All Implemented Interfaces:
Collector
This class wraps a Collector and times the execution of: - setScorer() - collect() -
doSetNextReader() - needsScores()
QueryProfiler facilitates the linking of the Collector graph
-
Constructor Summary
ConstructorDescriptionProfilerCollector
(Collector collector, String reason, List<ProfilerCollector> children) -
Method Summary
Modifier and TypeMethodDescriptiongetLeafCollector
(LeafReaderContext context) getName()
long
getTime()
-
Constructor Details
-
ProfilerCollector
-
-
Method Details
-
getTime
public long getTime()- Returns:
- the profiled time for this collector (inclusive of children)
-
getReason
- Returns:
- a human readable "hint" about what this collector was used for
-
getName
- Returns:
- the lucene class name of the collector
-
getLeafCollector
- Specified by:
getLeafCollector
in interfaceCollector
- Throws:
IOException
-
scoreMode
-
getProfileResult
-