[opt](profile) add whether use Nereids info in Profile (#21342)
add whether use Nereids or pipeline engine in profile, for example: Summary: - Profile ID: 460e710601674438-9df2d685bdfc20f8 - Task Type: QUERY ... - Is Nereids: Yes - Is Pipeline: Yes - Is Cached: No
This commit is contained in:
@ -42,6 +42,8 @@ public class SummaryProfile {
|
||||
public static final String DEFAULT_DB = "Default Db";
|
||||
public static final String SQL_STATEMENT = "Sql Statement";
|
||||
public static final String IS_CACHED = "Is Cached";
|
||||
public static final String IS_NEREIDS = "Is Nereids";
|
||||
public static final String IS_PIPELINE = "Is Pipeline";
|
||||
public static final String TOTAL_INSTANCES_NUM = "Total Instances Num";
|
||||
public static final String INSTANCES_NUM_PER_BE = "Instances Num Per BE";
|
||||
public static final String PARALLEL_FRAGMENT_EXEC_INSTANCE = "Parallel Fragment Exec Instance Num";
|
||||
@ -56,8 +58,8 @@ public class SummaryProfile {
|
||||
public static final String WAIT_FETCH_RESULT_TIME = "Wait and Fetch Result Time";
|
||||
|
||||
public static final ImmutableList<String> SUMMARY_KEYS = ImmutableList.of(PROFILE_ID, TASK_TYPE,
|
||||
START_TIME, END_TIME, TOTAL_TIME, TASK_STATE, USER, DEFAULT_DB, SQL_STATEMENT, IS_CACHED,
|
||||
TOTAL_INSTANCES_NUM, INSTANCES_NUM_PER_BE, PARALLEL_FRAGMENT_EXEC_INSTANCE, TRACE_ID);
|
||||
START_TIME, END_TIME, TOTAL_TIME, TASK_STATE, USER, DEFAULT_DB, SQL_STATEMENT, IS_NEREIDS, IS_PIPELINE,
|
||||
IS_CACHED, TOTAL_INSTANCES_NUM, INSTANCES_NUM_PER_BE, PARALLEL_FRAGMENT_EXEC_INSTANCE, TRACE_ID);
|
||||
|
||||
public static final ImmutableList<String> EXECUTION_SUMMARY_KEYS = ImmutableList.of(ANALYSIS_TIME, PLAN_TIME,
|
||||
SCHEDULE_TIME, FETCH_RESULT_TIME, WRITE_RESULT_TIME, WAIT_FETCH_RESULT_TIME);
|
||||
@ -229,6 +231,16 @@ public class SummaryProfile {
|
||||
return this;
|
||||
}
|
||||
|
||||
public SummaryBuilder isNereids(String isNereids) {
|
||||
map.put(IS_NEREIDS, isNereids);
|
||||
return this;
|
||||
}
|
||||
|
||||
public SummaryBuilder isPipeline(String isPipeline) {
|
||||
map.put(IS_PIPELINE, isPipeline);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Map<String, String> build() {
|
||||
return map;
|
||||
}
|
||||
|
||||
@ -315,6 +315,8 @@ public class StmtExecutor {
|
||||
.collect(Collectors.joining(",")));
|
||||
builder.parallelFragmentExecInstance(String.valueOf(context.sessionVariable.getParallelExecInstanceNum()));
|
||||
builder.traceId(context.getSessionVariable().getTraceId());
|
||||
builder.isNereids(context.getState().isNereids ? "Yes" : "No");
|
||||
builder.isPipeline(context.getSessionVariable().enablePipelineEngine ? "Yes" : "No");
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user