Skip to content

Conversation

ZhuochengShang
Copy link
Collaborator

Did you read the Contributor Guide?

Is this PR related to a ticket?

  • Yes, and the PR name follows the format [SEDONA-XXX] my subject.

  • Yes, and the PR name follows the format [GH-XXX] my subject. Closes #<issue_number>

  • No:

    • this is a documentation update. The PR name follows the format [DOCS] my subject
    • this is a CI update. The PR name follows the format [CI] my subject

What changes were proposed in this PR?

How was this patch tested?

Did this PR include necessary documentation updates?

  • Yes, I am adding a new API. I am using the current SNAPSHOT version number in vX.Y.Z format.
  • Yes, I have updated the documentation.
  • No, this PR does not affect any public API so no need to change the documentation.

@ZhuochengShang ZhuochengShang changed the title [GH-]point geography bench [GH-2307]point geography bench Aug 20, 2025
@github-actions github-actions bot added the root label Aug 20, 2025
@Kontinuation Kontinuation requested a review from Copilot August 21, 2025 00:55
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new JMH benchmarking module for testing geography point decoding performance. The addition provides performance testing capabilities for WKT parsing of Point and MultiPoint geometries with different dimensional configurations.

  • Adds a new geographyBench Maven module with JMH benchmarking capabilities
  • Implements benchmark tests for Point and MultiPoint WKT decoding performance
  • Integrates the new module into the existing Maven build profiles

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
pom.xml Adds geographyBench module to Maven build profiles
geographyBench/pom.xml Defines Maven configuration for the new benchmarking module with JMH dependencies
geographyBench/src/jmh/java/org/apache/sedona/bench/DecodeBenchPoint.java Implements JMH benchmark class for testing Point/MultiPoint WKT decoding performance

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.32</version> <!-- Or any recent version -->
Copy link
Preview

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard-coded version should be managed through Maven properties or parent POM dependency management to ensure consistency across the project.

Copilot uses AI. Check for mistakes.

Comment on lines 98 to 108
@Benchmark
public void decode_point(Blackhole bh) throws Exception {
Geography g = Constructors.geogFromWKT(wktPoint, 4326);
bh.consume(g);
}

@Benchmark
public void decode_multipoint(Blackhole bh) throws Exception {
Geography g = Constructors.geogFromWKT(wktMultiPoint, 4326);
bh.consume(g);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these benchmarks actually benchmarking WKT parsing instead of the decode method of Geography?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants