Skip to content
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

Sync internally staged commits #219

Merged
merged 11 commits into from
Apr 22, 2024
Merged

Sync internally staged commits #219

merged 11 commits into from
Apr 22, 2024

Conversation

eaufavor
Copy link
Member

No description provided.

atamakahere-git and others added 11 commits April 22, 2024 08:25
---
refactor: estimator::Estimator::reset
---
test: add test for Estimator::Reset
---
refactor: use iter in estimator

Includes-commit: 052d825
Includes-commit: 3f730eb
Includes-commit: b2fec3c
Includes-commit: d190680
Replicated-from: #16
---
Do not trim value

Includes-commit: 7431d24
Includes-commit: fdf6130
Replicated-from: #177
#181

Ran:
```
rg --pcre2 '(?<!(trace\!\()|(println\!\()|(warn\!\()|(info\!\()|(debug\!\()|(format\!\()|(error\!\()|(write\!\()|(panic\!\())\".*\{.+\"'
```

and audited the 200+ results by hand. Only messed up in a few places!

Hat-tip to Kevin for helping me understand the compile error messages I was
seeing trying to fix this naively.
My editor was defaulting to using the 2015 edition of the parser since that's
the default for an unset edition in fmt file. This fixes that by specifying that
we want to use the same edition for formatting that we do everywhere else.
Includes-commit: 6d2613d
Replicated-from: #130
Signed-off-by: Xiaobo Liu <[email protected]>
The TinyLFU test was failing for changes unrelated to anything in the tinyufo
crate. This changes the test to stop that! What was occurring was expected
behavior, so the test is what's changing instead of any internal logic.

What was happening were hash collisions in the bloom filter used by the
estimator. Instead of asserting that we'd always start counting from 0, we now
allow for this in the test by `get()`ing first, then comparing relative
values. For the final comparisons, we check that values are greater-than or
equal-to their lower bound as determined by the number of `incr()`s we called on
their keys.
Add an API to retrieve request body bytes read so far.
@eaufavor eaufavor merged commit 7b838b8 into main Apr 22, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants