提交 905191b2 编写于 作者: Y Yu Kun

add profiling


Former-commit-id: d2f8ccb60753cde4c8c51616757193bb724b2b9e
上级 bb572e11
......@@ -96,7 +96,7 @@ define_option(MILVUS_WITH_ZLIB "Build with zlib compression" ON)
define_option(MILVUS_WITH_KNOWHERE "Build with Knowhere" OFF)
define_option(MILVUS_ENABLE_PROFILING "Build with profiling" ON)
#define_option(MILVUS_ENABLE_PROFILING "Build with profiling" ON)
if(CMAKE_VERSION VERSION_LESS 3.7)
set(MILVUS_WITH_ZSTD_DEFAULT OFF)
......
......@@ -22,9 +22,9 @@ std::string GetTableName();
const std::string TABLE_NAME = GetTableName();
constexpr int64_t TABLE_DIMENSION = 512;
constexpr int64_t TABLE_INDEX_FILE_SIZE = 768;
constexpr int64_t BATCH_ROW_COUNT = 100000;
constexpr int64_t NQ = 100;
constexpr int64_t TABLE_INDEX_FILE_SIZE = 1024;
constexpr int64_t BATCH_ROW_COUNT = 1000000;
constexpr int64_t NQ = 10000;
constexpr int64_t TOP_K = 10;
constexpr int64_t SEARCH_TARGET = 5000; //change this value, result is different
constexpr int64_t ADD_VECTOR_LOOP = 1;
......@@ -306,7 +306,9 @@ ClientTest::Test(const std::string& address, const std::string& port) {
}
{//search vectors after build index finish
DoSearch(conn, search_record_array, "Search after build index finish");
for (uint64_t i = 0; i < 5; ++i) {
DoSearch(conn, search_record_array, "Search after build index finish");
}
// std::cout << conn->DumpTaskTables() << std::endl;
}
......@@ -338,7 +340,6 @@ ClientTest::Test(const std::string& address, const std::string& port) {
std::cout << "Server status before disconnect: " << status << std::endl;
}
Connection::Destroy(conn);
// conn->Disconnect();
{//server status
std::string status = conn->ServerStatus();
std::cout << "Server status after disconnect: " << status << std::endl;
......
......@@ -240,6 +240,7 @@ ClientProxy::Search(const std::string &table_name,
//step 3: search vectors
::milvus::grpc::TopKQueryResultList topk_query_result_list;
Status status = client_ptr_->Search(topk_query_result_list, search_param);
//step 4: convert result array
......@@ -254,6 +255,7 @@ ClientProxy::Search(const std::string &table_name,
topk_query_result_array.emplace_back(result);
}
return status;
} catch (std::exception &ex) {
......
......@@ -14,7 +14,7 @@
#include "GrpcMilvusServer.h"
#include "db/Utils.h"
#include "scheduler/SchedInst.h"
#include <gperftools/profiler.h>
//#include <gperftools/profiler.h>
#include "src/server/Server.h"
......
......@@ -56,7 +56,7 @@ TEST(DBSchedulerTest, TASK_QUEUE_TEST) {
ptr = queue.Back();
ASSERT_EQ(ptr->type(), engine::ScheduleTaskType::kIndexLoad);
load_task->Execute();
// load_task->Execute();
}
TEST(DBSchedulerTest, SEARCH_SCHEDULER_TEST) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册