Skip to content

Commit 8517dfe

Browse files
committed
Fix some memory estimation test failures
1 parent 5770bfe commit 8517dfe

9 files changed

+6
-11
lines changed

algo/src/test/java/org/neo4j/gds/triangle/IntersectingTriangleCountMemoryEstimateDefinitionTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void memoryEstimation(long nodeCount) {
3939
GraphDimensions graphDimensions = ImmutableGraphDimensions.builder().nodeCount(nodeCount).build();
4040

4141
long hugeAtomicLongArray = 24 + nodeCount * 8 + 16;
42-
long expected = 80 + hugeAtomicLongArray;
42+
long expected = 72 + hugeAtomicLongArray;
4343

4444
MemoryEstimationAssert.assertThat(memoryEstimation)
4545
.memoryRange(graphDimensions, new Concurrency(1))
@@ -55,7 +55,7 @@ void memoryEstimationLargePages(long nodeCount, long sizeOfHugeArray) {
5555
GraphDimensions graphDimensions = ImmutableGraphDimensions.builder().nodeCount(nodeCount).build();
5656

5757
long hugeAtomicLongArray = 32 + sizeOfHugeArray;
58-
long expected = 80 + hugeAtomicLongArray;
58+
long expected = 72 + hugeAtomicLongArray;
5959

6060
MemoryEstimationAssert.assertThat(memoryEstimation)
6161
.memoryRange(graphDimensions, new Concurrency(1))

algo/src/test/java/org/neo4j/gds/triangle/IntersectingTriangleCountTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434

3535
import java.util.Collections;
3636
import java.util.List;
37-
import java.util.Optional;
3837
import java.util.stream.Stream;
3938

4039
import static org.assertj.core.api.Assertions.assertThat;

algo/src/test/java/org/neo4j/gds/triangle/LargeIntersectingTriangleCountTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import org.neo4j.gds.termination.TerminationFlag;
3333

3434
import java.util.Collections;
35-
import java.util.Optional;
3635

3736
import static org.assertj.core.api.Assertions.assertThat;
3837

algo/src/test/java/org/neo4j/gds/triangle/LocalClusteringCoefficientMemoryEstimateDefinitionTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void memoryEstimation(long nodeCount) {
3838

3939
long triangleCountEstimate = 48 + 24 + nodeCount * 8 + 16;
4040
long hugeDoubleArray = 16 + nodeCount * 8 + 16;
41-
long expected = 96 + hugeDoubleArray + triangleCountEstimate;
41+
long expected = 88 + hugeDoubleArray + triangleCountEstimate;
4242

4343
MemoryEstimationAssert.assertThat(memoryEstimation)
4444
.memoryRange(graphDimensions, new Concurrency(1))
@@ -70,7 +70,7 @@ void memoryEstimationLargePages(long nodeCount, long sizeOfHugeArray) {
7070

7171
long triangleCountEstimate = 48 + 32 + sizeOfHugeArray;
7272
long hugeDoubleArray = 24 + sizeOfHugeArray;
73-
long expected = 96 + hugeDoubleArray + triangleCountEstimate;
73+
long expected = 88 + hugeDoubleArray + triangleCountEstimate;
7474

7575
MemoryEstimationAssert.assertThat(memoryEstimation)
7676
.memoryRange(graphDimensions, new Concurrency(1))

algo/src/test/java/org/neo4j/gds/triangle/TriangleCountMaxDegreeTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import org.neo4j.gds.termination.TerminationFlag;
3030

3131
import java.util.Collections;
32-
import java.util.Optional;
3332

3433
import static org.assertj.core.api.Assertions.assertThat;
3534

algo/src/test/java/org/neo4j/gds/triangle/TriangleStreamTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import org.neo4j.gds.termination.TerminationFlag;
3333

3434
import java.util.Collections;
35-
import java.util.Optional;
3635
import java.util.concurrent.atomic.AtomicInteger;
3736

3837
import static org.assertj.core.api.Assertions.assertThat;

algo/src/test/java/org/neo4j/gds/triangle/UnionGraphTriangleCountingTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import org.neo4j.gds.termination.TerminationFlag;
3232

3333
import java.util.Collections;
34-
import java.util.Optional;
3534

3635
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
3736

doc/modules/ROOT/pages/algorithms/local-clustering-coefficient.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ YIELD nodeCount, relationshipCount, bytesMin, bytesMax, requiredMemory
281281
[opts="header"]
282282
|===
283283
| nodeCount | relationshipCount | bytesMin | bytesMax | requiredMemory
284-
| 6 | 16 | 312 | 312 | "312 Bytes"
284+
| 6 | 16 | 304 | 304 | "304 Bytes"
285285
|===
286286
--
287287

doc/modules/ROOT/pages/algorithms/triangle-count.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ YIELD nodeCount, relationshipCount, bytesMin, bytesMax, requiredMemory
325325
[opts="header"]
326326
|===
327327
| nodeCount | relationshipCount | bytesMin | bytesMax | requiredMemory
328-
| 6 | 16 | 168 | 168 | "168 Bytes"
328+
| 6 | 16 | 160 | 160 | "160 Bytes"
329329
|===
330330
--
331331

0 commit comments

Comments
 (0)