use of org.neo4j.driver.internal.BoltServerAddress in project neo4j by neo4j.
the class OutputFormatterTest method shouldReportTotalDBHits.
@Test
public void shouldReportTotalDBHits() {
Value labelScan = buildOperator("NodeByLabelScan", 1002L, 1001L, null);
Value filter = buildOperator("Filter", 1402, 280, labelScan);
Value planMap = buildOperator("ProduceResults", 0, 280, filter);
ProfiledPlan plan = PROFILED_PLAN_FROM_VALUE.apply(planMap);
ResultSummary summary = new InternalResultSummary(new Query("PROFILE MATCH (n:LABEL) WHERE 20 < n.age < 35 return n"), new InternalServerInfo("agent", new BoltServerAddress("localhost:7687"), ServerVersion.vInDev, BoltProtocolV43.VERSION), new InternalDatabaseInfo("neo4j"), QueryType.READ_ONLY, null, plan, plan, Collections.emptyList(), 39, 55);
// When
Map<String, Value> info = OutputFormatter.info(summary);
// Then
assertThat(info.get("DbHits").asLong(), equalTo(2404L));
}
Aggregations