Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mysql): sql execution adaption for mysql5.7 #115

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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