-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report exponential_avg_bucket_processing_time which gives more weight to recent buckets #43189
Report exponential_avg_bucket_processing_time which gives more weight to recent buckets #43189
Conversation
Pinging @elastic/ml-core |
32552f0
to
cdb756d
Compare
191295e
to
3c91f8c
Compare
Now the Also, it would be good to add an example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think adding docs and updating the yml
REST tests would be good to do in this PR as well. My only comment in the review is not that important :D
/** | ||
* Updates the statistics (min, max, avg) for the given data point (bucket processing time). | ||
*/ | ||
public void updateStats(double bucketProcessingTimeMs) { | ||
if (bucketProcessingTimeMs < 0.0) { | ||
throw new IllegalArgumentException("bucketProcessingTimeMs must be positive, was: " + bucketProcessingTimeMs); | ||
throw new IllegalArgumentException("bucketProcessingTimeMs must be non-negative, was: " + bucketProcessingTimeMs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#pedantry
So, is 0.0
considered a negative number? 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if you've seen the latest revision of this comment ("bucketProcessingTimeMs must be non-negative, was: ") or not. But now I believe it is correct i.e. if the value is less than 0 we throw an error that it should be non-negative (so 0 or greater than 0).
Done.
Done. |
Done. |
(double) Maximum among all bucket processing times in milliseconds. | ||
|
||
`average_bucket_processing_time_ms`:: | ||
(double) Cumulative moving average of all bucket processing times in milliseconds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this contain the word "moving"?
To match the wording of min and max it could just be "Average of all bucket processing times in milliseconds."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
- gt: { jobs.0.timing_stats.minimum_bucket_processing_time_ms: 0.0 } | ||
- gt: { jobs.0.timing_stats.maximum_bucket_processing_time_ms: 0.0 } | ||
- gt: { jobs.0.timing_stats.average_bucket_processing_time_ms: 0.0 } | ||
- gt: { jobs.0.timing_stats.exponential_average_bucket_processing_time_ms: 0.0 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably safer to use gte
on lines 104-107 and 143-146. The jobs are only creating results for 1 bucket, and if the bucket processing time for that 1 bucket happens to round down to 0 then the gt
condition will fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
run elasticsearch-ci/default-distro |
fda922a
to
945cc39
Compare
run elasticsearch-ci/1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📊
945cc39
to
c322f1d
Compare
… to recent buckets (elastic#43189)
Report exponential_avg_bucket_processing_time which gives more weight to recent buckets.
Related issue: #29857