public final class Profiler extends Object
Constructor and Description |
---|
Profiler() |
Modifier and Type | Method and Description |
---|---|
static List<ProfileShardResult> |
buildShardResults(List<Profiler> profilers)
Helper method to convert Profiler into InternalProfileShardResults, which can be
serialized to other nodes, emitted as JSON, etc.
|
CollectorResult |
getCollector()
Return the current root Collector for this search
|
ProfileBreakdown |
getQueryBreakdown(org.apache.lucene.search.Query query)
Get the
ProfileBreakdown for the given query, potentially creating it if it did not exist. |
List<org.elasticsearch.search.profile.ProfileResult> |
getQueryTree() |
long |
getRewriteTime() |
void |
pollLastQuery()
Removes the last (e.g.
|
void |
setCollector(InternalProfileCollector collector)
Set the collector that is associated with this profiler.
|
void |
startRewriteTime()
Begin timing the rewrite phase of a request.
|
long |
stopAndAddRewriteTime()
Stop recording the current rewrite and add it's time to the total tally, returning the
cumulative time so far.
|
public void setCollector(InternalProfileCollector collector)
public ProfileBreakdown getQueryBreakdown(org.apache.lucene.search.Query query)
ProfileBreakdown
for the given query, potentially creating it if it did not exist.
This should only be used for queries that will be undergoing scoring. Do not use it to profile the
rewriting phasepublic void startRewriteTime()
public long stopAndAddRewriteTime()
public void pollLastQuery()
public List<org.elasticsearch.search.profile.ProfileResult> getQueryTree()
public long getRewriteTime()
public CollectorResult getCollector()
public static List<ProfileShardResult> buildShardResults(List<Profiler> profilers)
profilers
- A list of Profilers to convert into InternalProfileShardResultsCopyright © 2009–2016. All rights reserved.