[GH-2307]point geography bench#2307
Conversation
There was a problem hiding this comment.
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
geographyBenchMaven 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 --> |
There was a problem hiding this comment.
Hard-coded version should be managed through Maven properties or parent POM dependency management to ensure consistency across the project.
| @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); | ||
| } |
There was a problem hiding this comment.
Are these benchmarks actually benchmarking WKT parsing instead of the decode method of Geography?
Did you read the Contributor Guide?
Yes, I have read the Contributor Rules and Contributor Development Guide
No, I haven't read it.
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:
[DOCS] my subject[CI] my subjectWhat changes were proposed in this PR?
How was this patch tested?
Did this PR include necessary documentation updates?
vX.Y.Zformat.