Skip to content

Commit

Permalink
Different data sources uniformly use DB_SERVER_EXECUTE_SQL as DB excu…
Browse files Browse the repository at this point in the history
…tion time (#115)
  • Loading branch information
PeachThinking committed Sep 1, 2023
1 parent 4602d2a commit e4dd60f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public class SqlExecuteStages {
public static final String JDBC_PREPARE = "Jdbc prepare";
public static final String NETWORK_CONSUMPTION = "Network consumption";
public static final String OBSERVER_WAIT = "OBServer wait";
public static final String OBSERVER_EXECUTE_SQL = "OBServer Execute SQL";
public static final String INIT_SQL_CHECK_MESSAGE = "Init sql check message";
public static final String DB_SERVER_EXECUTE_SQL = "DB Server Execute SQL";
public static final String SQL_INTERCEPT_PRE_CHECK = "Sql intercept pre-check";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,8 @@ private void setExecuteTraceStage(TraceWatch traceWatch, SqlExecTime executeDeta
try (EditableTraceStage dbServerExecute =
traceWatch.startEditableStage(SqlExecuteStages.DB_SERVER_EXECUTE_SQL)) {
dbServerExecute.setStartTime(traceWatch.getByTaskName(SqlExecuteStages.EXECUTE).get(0).getStartTime(),
TimeUnit.MILLISECONDS);
dbServerExecute.setTime(executeDetails.getExecuteMicroseconds(), TimeUnit.MILLISECONDS);
TimeUnit.MICROSECONDS);
dbServerExecute.setTime(executeDetails.getExecuteMicroseconds(), TimeUnit.MICROSECONDS);
}
try (EditableTraceStage calculateDuration =
traceWatch.startEditableStage(SqlExecuteStages.CALCULATE_DURATION)) {
Expand Down Expand Up @@ -436,7 +436,7 @@ private void setExecuteTraceStage(TraceWatch traceWatch, SqlExecTime executeDeta
TimeUnit.MICROSECONDS);
}
try (EditableTraceStage obServerExecute =
traceWatch.startEditableStage(SqlExecuteStages.OBSERVER_EXECUTE_SQL)) {
traceWatch.startEditableStage(SqlExecuteStages.DB_SERVER_EXECUTE_SQL)) {
obServerExecute.setStartTime(
lastPacketResponseTimestamp - networkConsumption / 2 - executeDetails.getExecuteMicroseconds(),
TimeUnit.MICROSECONDS);
Expand Down

0 comments on commit e4dd60f

Please sign in to comment.