mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 10:59:32 +08:00
MS-248 support Milvus profiling, bug fix
Former-commit-id: 2375531ff984f2a30f6dd20c2189d469b6922117
This commit is contained in:
parent
f8875429b1
commit
4f47b5f7a9
@ -116,6 +116,11 @@ set(MILVUS_ENGINE_SRC ${PROJECT_SOURCE_DIR}/src)
|
||||
|
||||
add_compile_definitions(PROFILER=${PROFILER})
|
||||
|
||||
message("MILVUS_ENABLE_PROFILING = ${MILVUS_ENABLE_PROFILING}")
|
||||
if (MILVUS_ENABLE_PROFILING STREQUAL "ON")
|
||||
ADD_DEFINITIONS(-DMILVUS_ENABLE_PROFILING)
|
||||
endif()
|
||||
|
||||
include_directories(${MILVUS_ENGINE_INCLUDE})
|
||||
include_directories(${MILVUS_ENGINE_SRC})
|
||||
|
||||
@ -141,11 +146,6 @@ endif()
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf/server_config.template ${CMAKE_CURRENT_SOURCE_DIR}/conf/server_config.yaml)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf/log_config.template ${CMAKE_CURRENT_SOURCE_DIR}/conf/log_config.conf)
|
||||
|
||||
message("MILVUS_ENABLE_PROFILING = ${MILVUS_ENABLE_PROFILING}")
|
||||
if (MILVUS_ENABLE_PROFILING STREQUAL "ON")
|
||||
ADD_DEFINITIONS(-DMILVUS_ENABLE_PROFILING)
|
||||
endif()
|
||||
|
||||
#install
|
||||
install(DIRECTORY scripts/
|
||||
DESTINATION scripts
|
||||
|
@ -420,11 +420,9 @@ ServerError AddVectorTask::OnExecute() {
|
||||
rc.Record("check validation");
|
||||
|
||||
#ifdef MILVUS_ENABLE_PROFILING
|
||||
std::string fname = "/tmp/insert_" + std::to_string(this->record_array_.size()) + "_" +
|
||||
GetCurrTimeStr() + ".profiling";
|
||||
std::string fname = "/tmp/insert_" + std::to_string(this->record_array_.size()) +
|
||||
"_" + GetCurrTimeStr() + ".profiling";
|
||||
ProfilerStart(fname.c_str());
|
||||
#else
|
||||
std::cout << "CYD - MILVUS_ENABLE_PROFILING is OFF!" << std::endl;
|
||||
#endif
|
||||
|
||||
//step 3: prepare float data
|
||||
@ -533,8 +531,8 @@ ServerError SearchVectorTask::OnExecute() {
|
||||
rc.Record("check validation");
|
||||
|
||||
#ifdef MILVUS_ENABLE_PROFILING
|
||||
std::string fname = "/tmp/search_nq_" + std::to_string(this->record_array_.size()) + "_" +
|
||||
"top_" + std::to_string(this->top_k_) + "_" +
|
||||
std::string fname = "/tmp/search_nq_" + std::to_string(this->record_array_.size()) +
|
||||
"_top_" + std::to_string(this->top_k_) + "_" +
|
||||
GetCurrTimeStr() + ".profiling";
|
||||
ProfilerStart(fname.c_str());
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user