Skip to content

Commit

Permalink
Reduce memory usage of GeoGridTiler tests (#59921)
Browse files Browse the repository at this point in the history
This PR further reduces the memory footprint of the
testGeoHashGridCircuitBreaker test such that only
0.26% of the randomized runs result in memory usage of between
500kb-1mb. where most of that those that are in that range
produce ~650kb of usage. Before, 3% of the runs would use
> 50mb of memory resulting in OOMs in CI

Closes #59853.
  • Loading branch information
talevy authored Jul 20, 2020
1 parent 38af183 commit 803f368
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,9 @@ public void testGeoTileGridCircuitBreaker() throws IOException {
}

private void testCircuitBreaker(GeoGridTiler tiler) throws IOException {
Polygon polygon = GeometryTestUtils.randomPolygon(false);
int precision = randomIntBetween(0, 5);
TriangleTreeReader reader = triangleTreeReader(polygon, GeoShapeCoordinateEncoder.INSTANCE);
Geometry geometry = GeometryTestUtils.randomPolygon(false);
int precision = randomIntBetween(0, 3);
TriangleTreeReader reader = triangleTreeReader(geometry, GeoShapeCoordinateEncoder.INSTANCE);
MultiGeoShapeValues.GeoShapeValue value = new MultiGeoShapeValues.GeoShapeValue(reader);

List<Long> byteChangeHistory = new ArrayList<>();
Expand Down

0 comments on commit 803f368

Please sign in to comment.