mirror of https://github.com/milvus-io/milvus.git
refine unittest code
Former-commit-id: 07d66baee30ad9ab130ca3cbc75ca50adcb68865pull/191/head
parent
1982736a86
commit
74d6d518bd
|
@ -25,8 +25,8 @@ namespace {
|
|||
|
||||
static const char* TABLE_NAME = "test_group";
|
||||
static constexpr int64_t TABLE_DIM = 256;
|
||||
static constexpr int64_t VECTOR_COUNT = 250000;
|
||||
static constexpr int64_t INSERT_LOOP = 10000;
|
||||
static constexpr int64_t VECTOR_COUNT = 25000;
|
||||
static constexpr int64_t INSERT_LOOP = 1000;
|
||||
static constexpr int64_t SECONDS_EACH_HOUR = 3600;
|
||||
static constexpr int64_t DAY_SECONDS = 24 * 60 * 60;
|
||||
|
||||
|
|
|
@ -24,8 +24,6 @@ namespace {
|
|||
|
||||
static std::string TABLE_NAME = "test_group";
|
||||
static constexpr int64_t TABLE_DIM = 256;
|
||||
static constexpr int64_t VECTOR_COUNT = 250000;
|
||||
static constexpr int64_t INSERT_LOOP = 10000;
|
||||
|
||||
std::string GenTableName() {
|
||||
auto now = std::chrono::system_clock::now();
|
||||
|
@ -212,7 +210,7 @@ TEST_F(MemManagerTest2, SERIAL_INSERT_SEARCH_TEST) {
|
|||
std::map<int64_t, std::vector<float>> search_vectors;
|
||||
{
|
||||
engine::IDNumbers vector_ids;
|
||||
int64_t nb = 1024000;
|
||||
int64_t nb = 100000;
|
||||
std::vector<float> xb;
|
||||
BuildVectors(nb, xb);
|
||||
engine::Status status = db_->InsertVectors(TABLE_NAME, nb, xb.data(), vector_ids);
|
||||
|
@ -224,7 +222,7 @@ TEST_F(MemManagerTest2, SERIAL_INSERT_SEARCH_TEST) {
|
|||
std::mt19937 gen(rd());
|
||||
std::uniform_int_distribution<int64_t> dis(0, nb - 1);
|
||||
|
||||
int64_t num_query = 20;
|
||||
int64_t num_query = 10;
|
||||
for (int64_t i = 0; i < num_query; ++i) {
|
||||
int64_t index = dis(gen);
|
||||
std::vector<float> search;
|
||||
|
|
|
@ -22,8 +22,8 @@ namespace {
|
|||
|
||||
static const char* TABLE_NAME = "test_group";
|
||||
static constexpr int64_t TABLE_DIM = 256;
|
||||
static constexpr int64_t VECTOR_COUNT = 250000;
|
||||
static constexpr int64_t INSERT_LOOP = 10000;
|
||||
static constexpr int64_t VECTOR_COUNT = 25000;
|
||||
static constexpr int64_t INSERT_LOOP = 1000;
|
||||
|
||||
engine::meta::TableSchema BuildTableSchema() {
|
||||
engine::meta::TableSchema table_info;
|
||||
|
|
|
@ -288,7 +288,7 @@ TEST(DBSearchTest, PARALLEL_TOPK_TEST) {
|
|||
|
||||
DoTopk(5, 10, 4, false);
|
||||
DoTopk(20005, 998, 123, true);
|
||||
DoTopk(9987, 12, 10, false);
|
||||
DoTopk(77777, 1000, 1, false);
|
||||
DoTopk(5432, 8899, 8899, true);
|
||||
// DoTopk(9987, 12, 10, false);
|
||||
// DoTopk(77777, 1000, 1, false);
|
||||
// DoTopk(5432, 8899, 8899, true);
|
||||
}
|
Loading…
Reference in New Issue