Skip to content

[DE-548] peakMemoryUsage and executionTime explain stats (v6) #497

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

Merged
merged 1 commit into from
Apr 25, 2023
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 @@ -252,6 +252,8 @@ public static class ExecutionStats {
private Integer rulesExecuted;
private Integer rulesSkipped;
private Integer plansCreated;
private Long peakMemoryUsage;
private Double executionTime;

public Integer getRulesExecuted() {
return rulesExecuted;
Expand All @@ -265,6 +267,13 @@ public Integer getPlansCreated() {
return plansCreated;
}

public Long getPeakMemoryUsage() {
return peakMemoryUsage;
}

public Double getExecutionTime() {
return executionTime;
}
}

private ExecutionPlan plan;
Expand Down
4 changes: 4 additions & 0 deletions src/test/java/com/arangodb/ArangoDatabaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,10 @@ void explainQuery(ArangoDatabase db) {
assertThat(plan.getEstimatedNrItems()).isPositive();
assertThat(plan.getVariables()).hasSize(2);
assertThat(plan.getNodes()).isNotEmpty();
if (isAtLeastVersion(3, 10)) {
assertThat(explain.getStats().getPeakMemoryUsage()).isNotNull();
assertThat(explain.getStats().getExecutionTime()).isNotNull();
}
}

@ParameterizedTest(name = "{index}")
Expand Down