mirror of https://github.com/milvus-io/milvus.git
add profiling
Former-commit-id: 903596ea8eaa3675d658418f998cce1427ea8e5fpull/191/head
parent
488c728f70
commit
95bbaf4eda
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue