Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.
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 @@ -270,7 +270,7 @@ public void cypherWithProfileWithMemory() throws CommandException {
//then
String actual = linePrinter.output();
assertThat(actual.replace( " ", "" ), containsString("|Plan|Statement|Version|Planner|Runtime|Time|DbHits|Rows|Memory(Bytes)|")); // First table
assertThat(actual.replace( " ", "" ), containsString("|Operator|Details|EstimatedRows|Rows|DBHits|CacheH/M|Memory(Bytes)|")); // Second table
assertThat(actual.replace( " ", "" ), containsString("|Operator|Details|EstimatedRows|Rows|DBHits|Memory(Bytes)|PageCacheHits/Misses|")); // Second table
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class TablePlanFormatter {
private static final String ESTIMATED_ROWS = "Estimated Rows";
private static final String ROWS = "Rows";
private static final String HITS = "DB Hits";
private static final String PAGE_CACHE = "Cache H/M";
private static final String PAGE_CACHE = "Page Cache Hits/Misses";
private static final String TIME = "Time (ms)";
private static final String ORDER = "Ordered by";
private static final String MEMORY = "Memory (Bytes)";
Expand All @@ -45,11 +45,11 @@ public class TablePlanFormatter {
private static final Pattern DEDUP_PATTERN = Pattern.compile("\\s*(\\S+)@\\d+");
public static final int MAX_DETAILS_COLUMN_WIDTH = 100;

private static final List<String> HEADERS = asList(OPERATOR, DETAILS, ESTIMATED_ROWS, ROWS, HITS, PAGE_CACHE, TIME, MEMORY, IDENTIFIERS, ORDER, OTHER);
private static final List<String> HEADERS = asList(OPERATOR, DETAILS, ESTIMATED_ROWS, ROWS, HITS, MEMORY, PAGE_CACHE, TIME, IDENTIFIERS, ORDER, OTHER);

private static final Set<String> IGNORED_ARGUMENTS = new LinkedHashSet<>(
asList( "Rows", "DbHits", "EstimatedRows", "planner", "planner-impl", "planner-version", "version", "runtime", "runtime-impl", "runtime-version",
"time", "source-code", "PageCacheMisses", "PageCacheHits", "PageCacheHitRatio", "Order", "Memory", "GlobalMemory", "Details" ) );
"Time", "time", "source-code", "PageCacheMisses", "PageCacheHits", "PageCacheHitRatio", "Order", "Memory", "GlobalMemory", "Details" ) );
public static final Value ZERO_VALUE = Values.value(0);

private int width(@Nonnull String header, @Nonnull Map<String, Integer> columns) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ public void prettyPrintPlanInformation() {
"| \"PROFILE\" | \"READ_ONLY\" | \"3.1\" | \"COST\" | \"INTERPRETED\" | 12 | 1000 | 20 | 10 |",
"+-----------------------------------------------------------------------------------------------------+",
NEWLINE,
"+----------+----------------+------+---------+-----------+-----------+----------------+-------------+------------+----------------------------+",
"| Operator | Estimated Rows | Rows | DB Hits | Cache H/M | Time (ms) | Memory (Bytes) | Identifiers | Ordered by | Other |",
"+----------+----------------+------+---------+-----------+-----------+----------------+-------------+------------+----------------------------+",
"| +MyOp | 10 | 3 | 2 | 22/2 | 0.000 | 5 | a, b | a | 15; INTERPRETED; 3.1; COST |",
"+----------+----------------+------+---------+-----------+-----------+----------------+-------------+------------+----------------------------+",
"+----------+----------------+------+---------+----------------+------------------------+-----------+-------------+------------+------------------------+",
"| Operator | Estimated Rows | Rows | DB Hits | Memory (Bytes) | Page Cache Hits/Misses | Time (ms) | Identifiers | Ordered by | Other |",
"+----------+----------------+------+---------+----------------+------------------------+-----------+-------------+------------+------------------------+",
"| +MyOp | 10 | 3 | 2 | 5 | 22/2 | 0.000 | a, b | a | INTERPRETED; 3.1; COST |",
"+----------+----------------+------+---------+----------------+------------------------+-----------+-------------+------------+------------------------+",
"",
"0 rows available after 5 ms, consumed after another 7 ms" ) ));
}
Expand Down