-
Notifications
You must be signed in to change notification settings - Fork 83
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: smellthemoon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@smellthemoon Please associate the related issue to the body of your Pull Request. (eg. “issue: #”) |
unittest/test_async.cpp
Outdated
} | ||
|
||
protected: | ||
int32_t query_sum = 10; |
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.
put it in an anonymous namespace outside this class and rephrase to constexpr int32_t kQuerySum = 10;
unittest/test_async.cpp
Outdated
} | ||
int32_t num_threads_after_query = knowhere::threadchecker::GetThreadNum(pid); | ||
int32_t expected_num_threads = | ||
knowhere::threadchecker::GetQueryOmpThread(conf_) * query_sum + num_threads_after_build; |
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 build threads should be reused right?
int32_t num_threads_before_build = knowhere::threadchecker::GetThreadNum(pid); | ||
index_->BuildAll(base_dataset, conf_); | ||
int32_t num_threads_after_build = knowhere::threadchecker::GetThreadNum(pid); | ||
EXPECT_GE(knowhere::threadchecker::GetBuildOmpThread(conf_), |
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.
Why greater or equal instead of just equal?
int32_t num_threads_after_query = knowhere::threadchecker::GetThreadNum(pid); | ||
int32_t expected_num_threads = | ||
knowhere::threadchecker::GetQueryOmpThread(conf_) * query_sum + num_threads_after_build; | ||
EXPECT_GE(expected_num_threads, num_threads_after_query); |
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.
Same question, why GE
cd8ba3c
to
2eb2dd6
Compare
unittest/test_async.cpp
Outdated
|
||
protected: | ||
knowhere::Config conf_; | ||
knowhere::IndexType index_type_; |
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.
This field is not necessary
Signed-off-by: lixinguo <[email protected]>
2eb2dd6
to
3dd88a2
Compare
\lgtm |
/lgtm |
Signed-off-by: lixinguo <[email protected]> Signed-off-by: lixinguo <[email protected]> Co-authored-by: lixinguo <[email protected]>
Signed-off-by: lixinguo [email protected]
#486