-
Notifications
You must be signed in to change notification settings - Fork 401
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
Extract Network and Interface from utils #127
Conversation
2140052
to
8ac3808
Compare
Make |
@hicqu I think "need" is a very strong word, the only reason for TiKV to disable the feature is if we were worried a few milliseconds of compile time. I think the idea of using a component is very interesting. I will explore this. :) |
@hicqu Your idea was very good I think! PTAL again? |
LGTM. Please fix the conflict. 👍 |
@hicqu Sorry for the delay. :) |
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
@BusyJay PTAL! :) Resolved. |
Signed-off-by: Ana Hobden <[email protected]>
PTAL @hicqu @AndreMouche :) |
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
Signed-off-by: Ana Hobden <[email protected]>
825f844
to
09ef107
Compare
Signed-off-by: Ana Hobden <[email protected]>
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.
Rest LGTM
Merging with 2 LGTM from @hicqu and @AndreMouche (they said LGTM but seems it not approve it in the Github UI) |
We would like to be able to use this code in benchmarks (#109) and other tests but currently there is no way to use
Network
orInterface
from non-integration test code.This introduces a
harness
feature which exposesharness::{Interface, Network}
.There is some rationale to how this was done:
tests/
that is built for benchmarking, so they were moved into a test harness module.#[cfg(test)]
or#[cfg(debug_assertions)]
to have this only build in test or development, since bench marking builds in release. So we have to make a feature flag.cargo test
orcargo bench
by default without altering all defaults (such as what users get when they import Raft). So we must make this a default feature.Benefits:
Network
andInterface
to have their own modules as per Module shuffling and organizing #125 .Detriments:
cargo test
compile time. The impact should be minimal.