提交 43a3df31 编写于 作者: G groot

MS-246 refine log


Former-commit-id: e057186c6fcb61ffdec30fb2ca48c9b83b7ce5be
上级 5aca46b5
......@@ -504,7 +504,9 @@ SearchVectorTaskBase::SearchVectorTaskBase(const std::string &table_name,
ServerError SearchVectorTaskBase::OnExecute() {
try {
TimeRecorder rc("SearchVectorTask");
std::string title = "SearchVectorTask(n=" + std::to_string(record_array_.size())
+ " k=" + std::to_string(top_k_) + ")";
TimeRecorder rc(title);
//step 1: check arguments
ServerError res = SERVER_SUCCESS;
......@@ -596,7 +598,7 @@ ServerError SearchVectorTaskBase::OnExecute() {
//step 6: print time cost percent
double total_cost = span_check + span_prepare + span_search + span_result;
SERVER_LOG_DEBUG << "SearchVectorTask: " << "check validation(" << (span_check/total_cost)*100.0 << "%)"
SERVER_LOG_DEBUG << title << ": check validation(" << (span_check/total_cost)*100.0 << "%)"
<< " prepare data(" << (span_prepare/total_cost)*100.0 << "%)"
<< " search(" << (span_search/total_cost)*100.0 << "%)"
<< " construct result(" << (span_result/total_cost)*100.0 << "%)";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册