[Enhencement](Profile) add profile info for jdbc scanner #18569
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
|
||||
#include "runtime/plan_fragment_executor.h"
|
||||
|
||||
#include <gen_cpp/version.h>
|
||||
#include <thrift/protocol/TDebugProtocol.h>
|
||||
|
||||
#include <unordered_map>
|
||||
@ -204,6 +205,7 @@ Status PlanFragmentExecutor::prepare(const TExecPlanFragmentParams& request,
|
||||
|
||||
// set up profile counters
|
||||
profile()->add_child(_plan->runtime_profile(), true, nullptr);
|
||||
profile()->add_info_string("DoriBeVersion", DORIS_BUILD_SHORT_HASH);
|
||||
_rows_produced_counter = ADD_COUNTER(profile(), "RowsProduced", TUnit::UNIT);
|
||||
_blocks_produced_counter = ADD_COUNTER(profile(), "BlocksProduced", TUnit::UNIT);
|
||||
_fragment_cpu_timer = ADD_TIMER(profile(), "FragmentCpuTime");
|
||||
|
||||
@ -77,6 +77,11 @@ Status NewJdbcScanner::prepare(RuntimeState* state, VExprContext** vconjunct_ctx
|
||||
_jdbc_param.query_string = std::move(_query_string);
|
||||
_jdbc_param.table_type = _table_type;
|
||||
|
||||
get_parent()->_scanner_profile->add_info_string("JdbcDriverClass", _jdbc_param.driver_class);
|
||||
get_parent()->_scanner_profile->add_info_string("JdbcDriverUrl", _jdbc_param.driver_path);
|
||||
get_parent()->_scanner_profile->add_info_string("JdbcUrl", _jdbc_param.jdbc_url);
|
||||
get_parent()->_scanner_profile->add_info_string("QuerySql", _jdbc_param.query_string);
|
||||
|
||||
_jdbc_connector.reset(new (std::nothrow) JdbcConnector(_jdbc_param));
|
||||
if (_jdbc_connector == nullptr) {
|
||||
return Status::InternalError("new a jdbc scanner failed.");
|
||||
|
||||
Reference in New Issue
Block a user