Package org.elasticsearch.search.profile
Class ProfileResult
- java.lang.Object
-
- org.elasticsearch.search.profile.ProfileResult
-
- All Implemented Interfaces:
Writeable
,ToXContent
,ToXContentObject
public final class ProfileResult extends java.lang.Object implements Writeable, 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
ToXContent.DelegatingMapParams, ToXContent.MapParams, 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
Constructors Constructor Description ProfileResult(java.lang.String type, java.lang.String description, java.util.Map<java.lang.String,java.lang.Long> timings, java.util.List<ProfileResult> children)
ProfileResult(StreamInput in)
Read from a stream.
-
Method Summary
Modifier and Type Method Description static ProfileResult
fromXContent(XContentParser parser)
java.lang.String
getLuceneDescription()
Retrieve the lucene description of this query (e.g.java.util.List<ProfileResult>
getProfiledChildren()
Returns a list of all profiled children queriesjava.lang.String
getQueryName()
Retrieve the name of the query (e.g.long
getTime()
Returns the total time (inclusive of children) for this query node.java.util.Map<java.lang.String,java.lang.Long>
getTimeBreakdown()
Returns the timing breakdown for this particular query nodeXContentBuilder
toXContent(XContentBuilder builder, 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 Detail
-
ProfileResult
public ProfileResult(java.lang.String type, java.lang.String description, java.util.Map<java.lang.String,java.lang.Long> timings, java.util.List<ProfileResult> children)
-
ProfileResult
public ProfileResult(StreamInput in) throws java.io.IOException
Read from a stream.- Throws:
java.io.IOException
-
-
Method Detail
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Writeable
Write this into the StreamOutput.
-
getLuceneDescription
public java.lang.String getLuceneDescription()
Retrieve the lucene description of this query (e.g. the "explain" text)
-
getQueryName
public java.lang.String getQueryName()
Retrieve the name of the query (e.g. "TermQuery")
-
getTimeBreakdown
public java.util.Map<java.lang.String,java.lang.Long> getTimeBreakdown()
Returns the timing breakdown for this particular query node
-
getTime
public long getTime()
Returns the total time (inclusive of children) for this query node.- Returns:
- elapsed time in nanoseconds
-
getProfiledChildren
public java.util.List<ProfileResult> getProfiledChildren()
Returns a list of all profiled children queries
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
fromXContent
public static ProfileResult fromXContent(XContentParser parser) throws java.io.IOException
- Throws:
java.io.IOException
-
-