提交 2ff4cae2 编写于 作者: X Xu Peng

test(db): change test


Former-commit-id: e1922a567069b4c058acad186b8186b4cbbe0f4a
上级 5569f22d
......@@ -82,7 +82,7 @@ TEST_F(DBTest, DB_TEST) {
engine::IDNumbers target_ids;
int d = 256;
int nb = 100;
int nb = 50;
float *xb = new float[d * nb];
for(int i = 0; i < nb; i++) {
for(int j = 0; j < d; j++) xb[d * i + j] = drand48();
......@@ -100,13 +100,12 @@ TEST_F(DBTest, DB_TEST) {
engine::QueryResults results;
int k = 10;
std::this_thread::sleep_for(std::chrono::seconds(2));
/* std::this_thread::sleep_for(std::chrono::milliseconds(30)); */
INIT_TIMER;
std::stringstream ss;
long count = 0;
for (auto j=0; j<5; ++j) {
for (auto j=0; j<8; ++j) {
ss.str("");
db->count(group_name, count);
......@@ -122,7 +121,7 @@ TEST_F(DBTest, DB_TEST) {
}
});
int loop = 40000;
int loop = 100000;
for (auto i=0; i<loop; ++i) {
if (i==40) {
......@@ -130,7 +129,7 @@ TEST_F(DBTest, DB_TEST) {
} else {
db->add_vectors(group_name, nb, xb, vector_ids);
}
std::this_thread::sleep_for(std::chrono::microseconds(100));
std::this_thread::sleep_for(std::chrono::microseconds(5));
}
search.join();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册