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

add info #74

Merged
merged 2 commits into from
Dec 9, 2022
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 @@ -26,6 +26,7 @@ public void executeOperation(TOperation operation, NebulaDbConnectionState state
final String queryString = getQueryString(state, operation);
state.logQuery(operation.getClass().getSimpleName(), queryString);
final ResultSet result;
long startTime = System.currentTimeMillis();
try {
result = session.execute(queryString);
if (state.isPrintErrors() && !result.isSucceeded()) {
Expand All @@ -46,6 +47,11 @@ public void executeOperation(TOperation operation, NebulaDbConnectionState state

} catch (Exception e) {
throw new DbException(e);
} finally {
long threadID = Thread.currentThread().getId();
long consumeTime = (System.currentTimeMillis() - startTime) / 1000;
System.out.println("Query SimpleName : " + operation.getClass().getSimpleName());
System.out.println("threadID : " + threadID + " startTime : " + startTime / 1000 + " consumeTime : " + consumeTime);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public abstract class NebulaMultipleUpdateOperationHandler<TOperation extends Op
@Override
public void executeOperation(TOperation operation, NebulaDbConnectionState state, ResultReporter resultReporter) throws DbException {
Session session = state.getSession();
long startTime = System.currentTimeMillis();
try {
List<String> queryStrings = getQueryString(state, operation);
for (String queryString : queryStrings) {
Expand All @@ -27,6 +28,11 @@ public void executeOperation(TOperation operation, NebulaDbConnectionState state
}
} catch (Exception e) {
throw new DbException(e);
} finally {
long threadID = Thread.currentThread().getId();
long consumeTime = (System.currentTimeMillis() - startTime) / 1000;
System.out.println("Query SimpleName : " + operation.getClass().getSimpleName());
System.out.println("threadID : " + threadID + " startTime : " + startTime / 1000 + " consumeTime : " + consumeTime);
}
resultReporter.report(0, LdbcNoResult.INSTANCE, operation);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public abstract class NebulaSingletonOperationHandler <TOperation extends Operat
@Override
public void executeOperation(TOperation operation, NebulaDbConnectionState state, ResultReporter resultReporter) throws DbException {
Session session = state.getSession();
long startTime = System.currentTimeMillis();
try {
TOperationResult tuple = null;
int resultCount = 0;

final String queryString = getQueryString(state, operation);
state.logQuery(operation.getClass().getSimpleName(), queryString);
final ResultSet result = session.execute(queryString);
Expand All @@ -44,6 +44,11 @@ public void executeOperation(TOperation operation, NebulaDbConnectionState state
resultReporter.report(resultCount, tuple, operation);
} catch (Exception e) {
throw new DbException(e);
} finally {
long threadID = Thread.currentThread().getId();
long consumeTime = (System.currentTimeMillis() - startTime) / 1000;
System.out.println("Query SimpleName : " + operation.getClass().getSimpleName());
System.out.println("threadID : " + threadID + " startTime : " + startTime / 1000 + " consumeTime : " + consumeTime);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public abstract class NebulaUpdateOperationHandler <TOperation extends Operation
@Override
public void executeOperation(TOperation operation, NebulaDbConnectionState state, ResultReporter resultReporter) throws DbException {
Session session = state.getSession();
long startTime = System.currentTimeMillis();
try {
final String queryString = getQueryString(state, operation);
state.logQuery(operation.getClass().getSimpleName(), queryString);
Expand All @@ -23,6 +24,11 @@ public void executeOperation(TOperation operation, NebulaDbConnectionState state
}
} catch (Exception e) {
throw new DbException(e);
} finally {
long threadID = Thread.currentThread().getId();
long consumeTime = (System.currentTimeMillis() - startTime) / 1000;
System.out.println("Query SimpleName : " + operation.getClass().getSimpleName());
System.out.println("threadID : " + threadID + " startTime : " + startTime / 1000 + " consumeTime : " + consumeTime);
}
resultReporter.report(0, LdbcNoResult.INSTANCE, operation);
}
Expand Down