Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the ingest rate displayed in the CLI. (#4682)
* Fix the ingest rate displayed in the CLI. The CLI was showing the average rate since the CLI was started. This PR changes it to an estimation over the last 2 seconds. * Bugfix in the rate estimator The rate estimator was returning inflated results whenever we did not record any work during a bucket period. The fix does two things: - It replace the 1-bit color logic `(bucket_ord / num_buckets) % 2`` to a more generic and more accurate 8 bit hash `bucket_ord % 243`. Collision may only happen if no write targetted this specific bucket for `num_buckets x 243 x bucket_period`. Upon read, it checks for the hash and dismisses buckets that are not matching the hash. * Update quickwit/quickwit-common/src/tower/rate_estimator.rs Co-authored-by: trinity-1686a <[email protected]> --------- Co-authored-by: trinity-1686a <[email protected]>
- Loading branch information