Module org.elasticsearch.xcore
Class TimingStats
java.lang.Object
org.elasticsearch.xpack.core.ml.job.process.autodetect.state.TimingStats
- All Implemented Interfaces:
Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
public class TimingStats
extends Object
implements org.elasticsearch.xcontent.ToXContentObject, Writeable
Stats that give more insight into timing of various operations performed as part of anomaly detection job.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ConstructingObjectParser<TimingStats, Void> static final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionTimingStats(String jobId) TimingStats(String jobId, long bucketCount, Double minBucketProcessingTimeMs, Double maxBucketProcessingTimeMs, Double avgBucketProcessingTimeMs, Double exponentialAvgBucketProcessingTimeMs, ExponentialAverageCalculationContext exponentialAvgCalculationContext) TimingStats(TimingStats lhs) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdocumentId(String jobId) booleanlonggetJobId()doubleCalculates total bucket processing time as a product of the all-time average bucket processing time and the number of buckets.inthashCode()voidsetLatestRecordTimestamp(Instant latestRecordTimestamp) toString()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) voidupdateStats(double bucketProcessingTimeMs) Updates the statistics (min, max, avg, exponential avg) for the given data point (bucket processing time).voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
BUCKET_COUNT
public static final org.elasticsearch.xcontent.ParseField BUCKET_COUNT -
TOTAL_BUCKET_PROCESSING_TIME_MS
public static final org.elasticsearch.xcontent.ParseField TOTAL_BUCKET_PROCESSING_TIME_MS -
MIN_BUCKET_PROCESSING_TIME_MS
public static final org.elasticsearch.xcontent.ParseField MIN_BUCKET_PROCESSING_TIME_MS -
MAX_BUCKET_PROCESSING_TIME_MS
public static final org.elasticsearch.xcontent.ParseField MAX_BUCKET_PROCESSING_TIME_MS -
AVG_BUCKET_PROCESSING_TIME_MS
public static final org.elasticsearch.xcontent.ParseField AVG_BUCKET_PROCESSING_TIME_MS -
EXPONENTIAL_AVG_BUCKET_PROCESSING_TIME_MS
public static final org.elasticsearch.xcontent.ParseField EXPONENTIAL_AVG_BUCKET_PROCESSING_TIME_MS -
EXPONENTIAL_AVG_CALCULATION_CONTEXT
public static final org.elasticsearch.xcontent.ParseField EXPONENTIAL_AVG_CALCULATION_CONTEXT -
EXPONENTIAL_AVG_BUCKET_PROCESSING_TIME_PER_HOUR_MS
public static final org.elasticsearch.xcontent.ParseField EXPONENTIAL_AVG_BUCKET_PROCESSING_TIME_PER_HOUR_MS -
TYPE
public static final org.elasticsearch.xcontent.ParseField TYPE -
PARSER
-
-
Constructor Details
-
TimingStats
public TimingStats(String jobId, long bucketCount, @Nullable Double minBucketProcessingTimeMs, @Nullable Double maxBucketProcessingTimeMs, @Nullable Double avgBucketProcessingTimeMs, @Nullable Double exponentialAvgBucketProcessingTimeMs, ExponentialAverageCalculationContext exponentialAvgCalculationContext) -
TimingStats
-
TimingStats
-
TimingStats
- Throws:
IOException
-
-
Method Details
-
documentId
-
getJobId
-
getBucketCount
public long getBucketCount() -
getTotalBucketProcessingTimeMs
public double getTotalBucketProcessingTimeMs()Calculates total bucket processing time as a product of the all-time average bucket processing time and the number of buckets. -
getMinBucketProcessingTimeMs
-
getMaxBucketProcessingTimeMs
-
getAvgBucketProcessingTimeMs
-
getExponentialAvgBucketProcessingTimeMs
-
getExponentialAvgBucketProcessingTimePerHourMs
-
updateStats
public void updateStats(double bucketProcessingTimeMs) Updates the statistics (min, max, avg, exponential avg) for the given data point (bucket processing time). -
setLatestRecordTimestamp
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-