java.lang.Object
java.lang.Record
org.elasticsearch.script.ScriptStats
- Record Components:
contextStats- A list of differentScriptContextStatscompilations- Total number of compilations.cacheEvictions- Total number of evictions.compilationLimitTriggered- Total number of times that the compilation time has been reached.compilationsHistory- Historical information of the compilations in timeseries format.cacheEvictionsHistory- Historical information of the evictions in timeseries format.
- All Implemented Interfaces:
Writeable,ChunkedToXContent
public record ScriptStats(List<ScriptContextStats> contextStats, long compilations, long cacheEvictions, long compilationLimitTriggered, TimeSeries compilationsHistory, TimeSeries cacheEvictionsHistory)
extends Record
implements Writeable, ChunkedToXContent
Record object that holds global statistics of the scripts in a node.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionScriptStats(long compilations, long cacheEvictions, long compilationLimitTriggered, TimeSeries compilationsHistory, TimeSeries cacheEvictionsHistory) ScriptStats(List<ScriptContextStats> contextStats, long compilations, long cacheEvictions, long compilationLimitTriggered, TimeSeries compilationsHistory, TimeSeries cacheEvictionsHistory) Creates an instance of aScriptStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecacheEvictionsrecord component.Returns the value of thecacheEvictionsHistoryrecord component.longReturns the value of thecompilationLimitTriggeredrecord component.longReturns the value of thecompilationsrecord component.Returns the value of thecompilationsHistoryrecord component.Returns the value of thecontextStatsrecord component.final booleanIndicates whether some other object is "equal to" this one.longlonglongfinal inthashCode()Returns a hash code value for this object.static ScriptStatsmerge(ScriptStats first, ScriptStats second) static ScriptStatsread(List<ScriptContextStats> contextStats) static ScriptStatsread(StreamInput in) static ScriptStatsread(ScriptContextStats context) final StringtoString()Returns a string representation of this record class.Iterator<? extends ToXContent> toXContentChunked(ToXContent.Params params) Create an iterator ofToXContentchunks for a REST response.voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ChunkedToXContent
isFragment, toXContentChunkedV7
-
Field Details
-
IDENTITY
-
-
Constructor Details
-
ScriptStats
public ScriptStats(long compilations, long cacheEvictions, long compilationLimitTriggered, TimeSeries compilationsHistory, TimeSeries cacheEvictionsHistory) -
ScriptStats
public ScriptStats(List<ScriptContextStats> contextStats, long compilations, long cacheEvictions, long compilationLimitTriggered, TimeSeries compilationsHistory, TimeSeries cacheEvictionsHistory) Creates an instance of aScriptStatsrecord class.- Parameters:
contextStats- the value for thecontextStatsrecord componentcompilations- the value for thecompilationsrecord componentcacheEvictions- the value for thecacheEvictionsrecord componentcompilationLimitTriggered- the value for thecompilationLimitTriggeredrecord componentcompilationsHistory- the value for thecompilationsHistoryrecord componentcacheEvictionsHistory- the value for thecacheEvictionsHistoryrecord component
-
-
Method Details
-
merge
-
read
-
read
-
read
- Throws:
IOException
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
getContextStats
-
getCompilations
public long getCompilations() -
getCacheEvictions
public long getCacheEvictions() -
getCompilationLimitTriggered
public long getCompilationLimitTriggered() -
toScriptCacheStats
-
toXContentChunked
Description copied from interface:ChunkedToXContentCreate an iterator ofToXContentchunks for a REST response. Each chunk is serialized with the sameXContentBuilderandToXContent.Params, which is also the same as theToXContent.Paramspassed as theparamsargument. For best results, all chunks should beO(1)size. The last chunk in the iterator must always yield at least one byte of output. See alsoChunkedToXContentHelperfor some handy utilities.Note that chunked response bodies cannot send deprecation warning headers once transmission has started, so implementations must check for deprecated feature use before returning.
- Specified by:
toXContentChunkedin interfaceChunkedToXContent- Returns:
- iterator over chunks of
ToXContent
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
contextStats
Returns the value of thecontextStatsrecord component.- Returns:
- the value of the
contextStatsrecord component
-
compilations
public long compilations()Returns the value of thecompilationsrecord component.- Returns:
- the value of the
compilationsrecord component
-
cacheEvictions
public long cacheEvictions()Returns the value of thecacheEvictionsrecord component.- Returns:
- the value of the
cacheEvictionsrecord component
-
compilationLimitTriggered
public long compilationLimitTriggered()Returns the value of thecompilationLimitTriggeredrecord component.- Returns:
- the value of the
compilationLimitTriggeredrecord component
-
compilationsHistory
Returns the value of thecompilationsHistoryrecord component.- Returns:
- the value of the
compilationsHistoryrecord component
-
cacheEvictionsHistory
Returns the value of thecacheEvictionsHistoryrecord component.- Returns:
- the value of the
cacheEvictionsHistoryrecord component
-