diff --git a/internal/core/unittest/test_exec.cpp b/internal/core/unittest/test_exec.cpp index 026134bd1b..ceae28e5d1 100644 --- a/internal/core/unittest/test_exec.cpp +++ b/internal/core/unittest/test_exec.cpp @@ -84,7 +84,7 @@ class TaskTest : public testing::TestWithParam { schema->set_primary_field_id(str1_fid); auto segment = CreateSealedSegment(schema); - size_t N = 1000000; + size_t N = 10000; num_rows_ = N; auto raw_data = DataGen(schema, N); auto fields = schema->get_fields(); @@ -131,7 +131,7 @@ TEST_P(TaskTest, UnaryExpr) { auto query_context = std::make_shared( "test1", segment_.get(), - 1000000, + num_rows_, MAX_TIMESTAMP, std::make_shared( std::unordered_map{})); @@ -175,7 +175,7 @@ TEST_P(TaskTest, LogicalExpr) { auto query_context = std::make_shared( "test1", segment_.get(), - 1000000, + num_rows_, MAX_TIMESTAMP, std::make_shared( std::unordered_map{})); @@ -232,7 +232,7 @@ TEST_P(TaskTest, CompileInputs_and) { auto expr7 = std::make_shared( expr::LogicalBinaryExpr::OpType::And, expr3, expr6); auto query_context = std::make_shared( - DEAFULT_QUERY_ID, segment_.get(), 1000000, MAX_TIMESTAMP); + DEAFULT_QUERY_ID, segment_.get(), num_rows_, MAX_TIMESTAMP); auto exprs = milvus::exec::CompileInputs(expr7, query_context.get(), {}); EXPECT_EQ(exprs.size(), 4); for (int i = 0; i < exprs.size(); ++i) { @@ -274,7 +274,7 @@ TEST_P(TaskTest, CompileInputs_or_with_and) { auto expr6 = std::make_shared( expr::LogicalBinaryExpr::OpType::And, expr1, expr2); auto query_context = std::make_shared( - DEAFULT_QUERY_ID, segment_.get(), 1000000, MAX_TIMESTAMP); + DEAFULT_QUERY_ID, segment_.get(), num_rows_, MAX_TIMESTAMP); auto expr7 = std::make_shared( expr::LogicalBinaryExpr::OpType::Or, expr3, expr6); auto exprs = @@ -308,7 +308,7 @@ TEST_P(TaskTest, CompileInputs_or_with_and) { auto expr6 = std::make_shared( expr::LogicalBinaryExpr::OpType::And, expr1, expr2); auto query_context = std::make_shared( - DEAFULT_QUERY_ID, segment_.get(), 1000000, MAX_TIMESTAMP); + DEAFULT_QUERY_ID, segment_.get(), num_rows_, MAX_TIMESTAMP); auto expr7 = std::make_shared( expr::LogicalBinaryExpr::OpType::Or, expr3, expr6); auto exprs = @@ -345,7 +345,7 @@ TEST_P(TaskTest, CompileInputs_or_with_and) { auto expr6 = std::make_shared( expr::LogicalBinaryExpr::OpType::And, expr1, expr2); auto query_context = std::make_shared( - DEAFULT_QUERY_ID, segment_.get(), 1000000, MAX_TIMESTAMP); + DEAFULT_QUERY_ID, segment_.get(), num_rows_, MAX_TIMESTAMP); auto expr7 = std::make_shared( expr::LogicalBinaryExpr::OpType::And, expr3, expr6); auto exprs = diff --git a/internal/core/unittest/test_expr.cpp b/internal/core/unittest/test_expr.cpp index efeae58f78..33b231ca83 100644 --- a/internal/core/unittest/test_expr.cpp +++ b/internal/core/unittest/test_expr.cpp @@ -1271,7 +1271,7 @@ TEST(Expr, TestExprPerformance) { {DataType::DOUBLE, double_fid}}; auto seg = CreateSealedSegment(schema); - int N = 1000000; + int N = 10000; auto raw_data = DataGen(schema, N); // load field data @@ -1678,7 +1678,7 @@ TEST_P(ExprTest, TestSealedSegmentGetBatchSize) { schema->set_primary_field_id(str1_fid); auto seg = CreateSealedSegment(schema); - int N = 1000000; + int N = 40000; auto raw_data = DataGen(schema, N); // load field data auto fields = schema->get_fields(); @@ -1739,7 +1739,7 @@ TEST_P(ExprTest, TestGrowingSegmentGetBatchSize) { schema->set_primary_field_id(str1_fid); auto seg = CreateGrowingSegment(schema, empty_index_meta); - int N = 1000000; + int N = 400000; auto raw_data = DataGen(schema, N); seg->PreInsert(N); seg->Insert(0, @@ -1804,7 +1804,7 @@ TEST_P(ExprTest, TestConjuctExpr) { schema->set_primary_field_id(str1_fid); auto seg = CreateSealedSegment(schema); - int N = 1000000; + int N = 10000; auto raw_data = DataGen(schema, N); // load field data auto fields = schema->get_fields(); @@ -1871,7 +1871,7 @@ TEST_P(ExprTest, TestUnaryBenchTest) { schema->set_primary_field_id(str1_fid); auto seg = CreateSealedSegment(schema); - int N = 1000000; + int N = 10000; auto raw_data = DataGen(schema, N); // load field data @@ -1942,7 +1942,7 @@ TEST_P(ExprTest, TestBinaryRangeBenchTest) { schema->set_primary_field_id(str1_fid); auto seg = CreateSealedSegment(schema); - int N = 1000000; + int N = 10000; auto raw_data = DataGen(schema, N); // load field data @@ -2022,7 +2022,7 @@ TEST_P(ExprTest, TestLogicalUnaryBenchTest) { schema->set_primary_field_id(str1_fid); auto seg = CreateSealedSegment(schema); - int N = 1000000; + int N = 10000; auto raw_data = DataGen(schema, N); // load field data @@ -2096,7 +2096,7 @@ TEST_P(ExprTest, TestBinaryLogicalBenchTest) { schema->set_primary_field_id(str1_fid); auto seg = CreateSealedSegment(schema); - int N = 1000000; + int N = 10000; auto raw_data = DataGen(schema, N); // load field data @@ -2180,7 +2180,7 @@ TEST_P(ExprTest, TestBinaryArithOpEvalRangeBenchExpr) { schema->set_primary_field_id(str1_fid); auto seg = CreateSealedSegment(schema); - int N = 1000000; + int N = 10000; auto raw_data = DataGen(schema, N); // load field data @@ -2263,7 +2263,7 @@ TEST_P(ExprTest, TestCompareExprBenchTest) { schema->set_primary_field_id(str1_fid); auto seg = CreateSealedSegment(schema); - int N = 1000000; + int N = 10000; auto raw_data = DataGen(schema, N); // load field data @@ -2333,7 +2333,7 @@ TEST_P(ExprTest, TestRefactorExprs) { schema->set_primary_field_id(str1_fid); auto seg = CreateSealedSegment(schema); - int N = 1000000; + int N = 10000; auto raw_data = DataGen(schema, N); // load field data diff --git a/internal/core/unittest/test_growing_index.cpp b/internal/core/unittest/test_growing_index.cpp index 7d619182b6..880f329bf7 100644 --- a/internal/core/unittest/test_growing_index.cpp +++ b/internal/core/unittest/test_growing_index.cpp @@ -136,7 +136,7 @@ TEST_P(GrowingIndexTest, Correctness) { auto range_plan_str = range_query_plan_node.SerializeAsString(); int64_t per_batch = 10000; - int64_t n_batch = 20; + int64_t n_batch = 3; int64_t top_k = 5; for (int64_t i = 0; i < n_batch; i++) { auto dataset = DataGen(schema, per_batch); @@ -247,8 +247,8 @@ TEST_P(GrowingIndexTest, GetVector) { if (data_type == DataType::VECTOR_FLOAT) { // GetVector for VECTOR_FLOAT - int64_t per_batch = 5000; - int64_t n_batch = 20; + int64_t per_batch = 10000; + int64_t n_batch = 3; int64_t dim = 128; for (int64_t i = 0; i < n_batch; i++) { auto dataset = DataGen(schema, per_batch); @@ -277,8 +277,8 @@ TEST_P(GrowingIndexTest, GetVector) { } } else if (is_sparse) { // GetVector for VECTOR_SPARSE_FLOAT - int64_t per_batch = 5000; - int64_t n_batch = 20; + int64_t per_batch = 10000; + int64_t n_batch = 3; int64_t dim = 128; for (int64_t i = 0; i < n_batch; i++) { auto dataset = DataGen(schema, per_batch); diff --git a/internal/core/unittest/test_indexing.cpp b/internal/core/unittest/test_indexing.cpp index 9862d83993..75e425e7b3 100644 --- a/internal/core/unittest/test_indexing.cpp +++ b/internal/core/unittest/test_indexing.cpp @@ -233,7 +233,7 @@ TEST(Indexing, BinaryBruteForce) { } TEST(Indexing, Naive) { - constexpr int N = 10000; + constexpr int N = 1000; constexpr int TOPK = 10; auto [raw_data, timestamps, uids] = generate_data(N); @@ -410,7 +410,7 @@ INSTANTIATE_TEST_SUITE_P( std::pair(knowhere::IndexEnum::INDEX_HNSW, knowhere::metric::L2))); TEST(Indexing, Iterator) { - constexpr int N = 10240; + constexpr int N = 1024; constexpr int TOPK = 100; constexpr int dim = 128; @@ -754,7 +754,7 @@ TEST(Indexing, SearchDiskAnnWithInvalidParam) { } TEST(Indexing, SearchDiskAnnWithFloat16) { - int64_t NB = 1000; + int64_t NB = 100; int64_t NQ = 2; int64_t K = 4; IndexType index_type = knowhere::IndexEnum::INDEX_DISKANN;