diff --git a/cpp/src/scheduler/task/SearchTask.cpp b/cpp/src/scheduler/task/SearchTask.cpp index 56885bae529939973ea41898c8ca179d09b0a97f..808bb55c9e676b288fa5bbb5721f52d934d99b27 100644 --- a/cpp/src/scheduler/task/SearchTask.cpp +++ b/cpp/src/scheduler/task/SearchTask.cpp @@ -157,18 +157,12 @@ XSearchTask::Execute() { try { //step 2: search - auto start = std::chrono::high_resolution_clock::now(); index_engine_->Search(context->nq(), context->vectors(), inner_k, nprobe, output_distence.data(), output_ids.data()); - auto finish = std::chrono::high_resolution_clock::now(); -// std::cout << "Knowhere COST: " << std::chrono::duration_cast>(finish - start).count() << "s\n"; -// std::cout << "********************************************************\n"; - double span = rc.RecordSection("do search for context:" + context->Identity()); context->AccumSearchCost(span); - start = std::chrono::high_resolution_clock::now(); //step 3: cluster result SearchContext::ResultSet result_set; @@ -183,10 +177,6 @@ XSearchTask::Execute() { context->AccumReduceCost(span); span = rc.RecordSection("reduce topk for context:" + context->Identity()); - finish = std::chrono::high_resolution_clock::now(); -// std::cout << "Reduce COST: " << std::chrono::duration_cast>(finish - start).count() << "s\n"; -// std::cout << "********************************************************\n"; - } catch (std::exception &ex) { ENGINE_LOG_ERROR << "SearchTask encounter exception: " << ex.what(); context->IndexSearchDone(index_id_);//mark as done avoid dead lock, even search failed