Package org.elasticsearch.search.profile
Class ProfileResult
java.lang.Object
org.elasticsearch.search.profile.ProfileResult
- All Implemented Interfaces:
Writeable
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentObject
public final class ProfileResult
extends Object
implements Writeable, org.elasticsearch.common.xcontent.ToXContentObject
This class is the internal representation of a profiled Query, corresponding
to a single node in the query tree. It is built after the query has finished executing
and is merely a structured representation, rather than the entity that collects the timing
profile (see InternalProfiler for that)
Each InternalProfileResult has a List of InternalProfileResults, which will contain "children" queries if applicable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProfileResult
fromXContent(org.elasticsearch.common.xcontent.XContentParser p)
The debug information about the profiled execution.Retrieve the lucene description of this query (e.g.Returns a list of all profiled children queriesRetrieve the name of the entry (e.g.long
getTime()
Returns the total time (inclusive of children) for this query node.The timing breakdown for this node.org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
ProfileResult
-
ProfileResult
Read from a stream.- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
getLuceneDescription
Retrieve the lucene description of this query (e.g. the "explain" text) -
getQueryName
Retrieve the name of the entry (e.g. "TermQuery" or "LongTermsAggregator") -
getTimeBreakdown
The timing breakdown for this node. -
getDebugInfo
The debug information about the profiled execution. -
getTime
public long getTime()Returns the total time (inclusive of children) for this query node.- Returns:
- elapsed time in nanoseconds
-
getProfiledChildren
Returns a list of all profiled children queries -
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
IOException
-
fromXContent
public static ProfileResult fromXContent(org.elasticsearch.common.xcontent.XContentParser p) throws IOException- Throws:
IOException
-