Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 002a3d9

Browse files
authored
Merge pull request #232 from sherfert/4.2-headers
Align cypher-shell PROFILE headers with embedded.
2 parents 42f3646 + 5f7fc7f commit 002a3d9

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

cypher-shell/src/integration-test/java/org/neo4j/shell/commands/CypherShellVerboseIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public void cypherWithProfileWithMemory() throws CommandException {
270270
//then
271271
String actual = linePrinter.output();
272272
assertThat(actual.replace( " ", "" ), containsString("|Plan|Statement|Version|Planner|Runtime|Time|DbHits|Rows|Memory(Bytes)|")); // First table
273-
assertThat(actual.replace( " ", "" ), containsString("|Operator|Details|EstimatedRows|Rows|DBHits|CacheH/M|Memory(Bytes)|")); // Second table
273+
assertThat(actual.replace( " ", "" ), containsString("|Operator|Details|EstimatedRows|Rows|DBHits|Memory(Bytes)|PageCacheHits/Misses|")); // Second table
274274
}
275275

276276
@Test

cypher-shell/src/main/java/org/neo4j/shell/prettyprint/TablePlanFormatter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class TablePlanFormatter {
3434
private static final String ESTIMATED_ROWS = "Estimated Rows";
3535
private static final String ROWS = "Rows";
3636
private static final String HITS = "DB Hits";
37-
private static final String PAGE_CACHE = "Cache H/M";
37+
private static final String PAGE_CACHE = "Page Cache Hits/Misses";
3838
private static final String TIME = "Time (ms)";
3939
private static final String ORDER = "Ordered by";
4040
private static final String MEMORY = "Memory (Bytes)";
@@ -45,11 +45,11 @@ public class TablePlanFormatter {
4545
private static final Pattern DEDUP_PATTERN = Pattern.compile("\\s*(\\S+)@\\d+");
4646
public static final int MAX_DETAILS_COLUMN_WIDTH = 100;
4747

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

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

5555
private int width(@Nonnull String header, @Nonnull Map<String, Integer> columns) {

cypher-shell/src/test/java/org/neo4j/shell/prettyprint/TableOutputFormatterTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ public void prettyPrintPlanInformation() {
101101
"| \"PROFILE\" | \"READ_ONLY\" | \"3.1\" | \"COST\" | \"INTERPRETED\" | 12 | 1000 | 20 | 10 |",
102102
"+-----------------------------------------------------------------------------------------------------+",
103103
NEWLINE,
104-
"+----------+----------------+------+---------+-----------+-----------+----------------+-------------+------------+----------------------------+",
105-
"| Operator | Estimated Rows | Rows | DB Hits | Cache H/M | Time (ms) | Memory (Bytes) | Identifiers | Ordered by | Other |",
106-
"+----------+----------------+------+---------+-----------+-----------+----------------+-------------+------------+----------------------------+",
107-
"| +MyOp | 10 | 3 | 2 | 22/2 | 0.000 | 5 | a, b | a | 15; INTERPRETED; 3.1; COST |",
108-
"+----------+----------------+------+---------+-----------+-----------+----------------+-------------+------------+----------------------------+",
104+
"+----------+----------------+------+---------+----------------+------------------------+-----------+-------------+------------+------------------------+",
105+
"| Operator | Estimated Rows | Rows | DB Hits | Memory (Bytes) | Page Cache Hits/Misses | Time (ms) | Identifiers | Ordered by | Other |",
106+
"+----------+----------------+------+---------+----------------+------------------------+-----------+-------------+------------+------------------------+",
107+
"| +MyOp | 10 | 3 | 2 | 5 | 22/2 | 0.000 | a, b | a | INTERPRETED; 3.1; COST |",
108+
"+----------+----------------+------+---------+----------------+------------------------+-----------+-------------+------------+------------------------+",
109109
"",
110110
"0 rows available after 5 ms, consumed after another 7 ms" ) ));
111111
}

0 commit comments

Comments
 (0)