-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
chore(performance): file-source
testing and benchmarks
#6742
Conversation
file-source
file
source
lib/file-source/src/file_watcher.rs
Outdated
/// The return is unusual. In the Err case this function has not written into | ||
/// `buf` and the caller should not examine its contents. In the Ok case if the | ||
/// inner value is None the caller should retry the call as the buffering read | ||
/// hit the end of the buffer but did not find a `delim` yet, indicating that | ||
/// we've sheered a write or that there were no bytes available in the `reader` | ||
/// and the `reader` was very sure about it. If the inner value is Some the | ||
/// interior `usize` is the number of bytes written into `buf`. |
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.
There's more context on why it's in this unusual state in the description of #4089. Very much a classic "we'll clean this up soon" 🙂
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.
A good friend of mine was prone to say "there's nothing permanent like temporary". 😂
file
sourcefile-source
testing and benchmarks
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.
The errors seem to originate from upgrading bytes
from 0.5
to 1.0
, other than that this looks good.
@@ -0,0 +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.
Do we need this file?
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.
We sure do not. Just junk I accidentally left in-tree.
This commit is the start of a process to address #6730. The major changes introduced in this commit so far are application of clippy suggestions and model checks of the `read_until_with_max_size` test. I have a pretty good idea of how that function works now and will be introducing benchmarks. Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
In this commit I have introduce a benchmark for the read_until etc function. To do this I've had to make it part of the public API of the crate, but since the crate sits inside a larger project I'm less chuffed about this. I have fiddled with the test layout some as well. Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
This crate looks to be challenging to upgrade. Best to do once tokio is updated in this project. Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
A merge conflict has summoned me, just came to confirm: |
This PR commit is the start of a process to address #6730 by way of implementation of RFC 3480. The major changes introduced here are criterion benchmarks for an internal component of the
file-source
crate and modification of the testing regime to make use of Quickcheck. The results are nothing ground shaking: the new model tests do not turn up any flaw in theread_until...
function and the benchmarks show it to be reasonably fast. That's good. Now we know. The more recent indications from vector-test-harness are that our issue centers not on any individually expensive operation but on the cooperative, fair scheduling of this crate. Approaches to that are beyond the scope of this PR.Signed-off-by: Brian L. Troutwine brian@troutwine.us