You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "Kontinuation (via GitHub)" <gi...@apache.org> on 2026/02/11 17:19:18 UTC
[PR] refactor(raster): split monolithic benchmark into per-function benchmark files [sedona-db]
Kontinuation opened a new pull request, #600:
URL: https://github.com/apache/sedona-db/pull/600
## Summary
- Split `benches/native-raster-functions.rs` into separate per-function benchmark files: `rs_envelope`, `rs_geotransform`, `rs_rastercoordinate`, `rs_size`, `rs_srid`, and `rs_worldcoordinate`
- Updated `Cargo.toml` `[[bench]]` entries to match the new file names
- Added multi-size benchmarks (64x64, 256x256, 1024x1024) for `rs_envelope`, `rs_size` (width/height)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(rust/sedona-raster-functions): Split monolithic benchmark into per-function benchmark files [sedona-db]
Posted by "Kontinuation (via GitHub)" <gi...@apache.org>.
Kontinuation commented on PR #600:
URL: https://github.com/apache/sedona-db/pull/600#issuecomment-3887985883
Most of the benchmarks in this module are just a few lines, splitting them to multiple files may not be a good idea.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(rust/sedona-raster-functions): Split monolithic benchmark into per-function benchmark files [sedona-db]
Posted by "Kontinuation (via GitHub)" <gi...@apache.org>.
Kontinuation closed pull request #600: refactor(rust/sedona-raster-functions): Split monolithic benchmark into per-function benchmark files
URL: https://github.com/apache/sedona-db/pull/600
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(rust/sedona-raster-functions): Split monolithic benchmark into per-function benchmark files [sedona-db]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #600:
URL: https://github.com/apache/sedona-db/pull/600#discussion_r2794568721
##########
rust/sedona-raster-functions/benches/rs_envelope.rs:
##########
@@ -0,0 +1,31 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use criterion::{criterion_group, criterion_main, Criterion};
+use sedona_testing::benchmark_util::{benchmark, BenchmarkArgSpec::*};
+
+fn criterion_benchmark(c: &mut Criterion) {
+ let f = sedona_raster_functions::register::default_function_set();
+
+ // RS_Envelope(raster)
+ benchmark::scalar(c, &f, "rs_envelope", "rs_envelope", Raster(64, 64));
+ benchmark::scalar(c, &f, "rs_envelope", "rs_envelope", Raster(256, 256));
+ benchmark::scalar(c, &f, "rs_envelope", "rs_envelope", Raster(1024, 1024));
Review Comment:
All three benchmark registrations share the same group and function name strings, which can make Criterion output hard to interpret and (depending on how `benchmark::scalar` names benchmarks) can risk non-unique benchmark IDs. Consider incorporating the raster size into the benchmark ID (or group name) explicitly, and/or looping over a `[(64,64), (256,256), (1024,1024)]` list to avoid repeated calls.
```suggestion
// RS_Envelope(raster) for various raster sizes
for &(width, height) in &[(64, 64), (256, 256), (1024, 1024)] {
let group_name = format!("rs_envelope_{}x{}", width, height);
benchmark::scalar(c, &f, &group_name, "rs_envelope", Raster(width, height));
}
```
##########
rust/sedona-raster-functions/benches/rs_size.rs:
##########
@@ -0,0 +1,36 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use criterion::{criterion_group, criterion_main, Criterion};
+use sedona_testing::benchmark_util::{benchmark, BenchmarkArgSpec::*};
+
+fn criterion_benchmark(c: &mut Criterion) {
+ let f = sedona_raster_functions::register::default_function_set();
+
+ // RS_Width(raster)
+ benchmark::scalar(c, &f, "rs_size", "rs_width", Raster(64, 64));
+ benchmark::scalar(c, &f, "rs_size", "rs_width", Raster(256, 256));
+ benchmark::scalar(c, &f, "rs_size", "rs_width", Raster(1024, 1024));
+
+ // RS_Height(raster)
+ benchmark::scalar(c, &f, "rs_size", "rs_height", Raster(64, 64));
+ benchmark::scalar(c, &f, "rs_size", "rs_height", Raster(256, 256));
+ benchmark::scalar(c, &f, "rs_size", "rs_height", Raster(1024, 1024));
Review Comment:
This repeats the same benchmark registration pattern for multiple raster sizes and for both width/height. To reduce duplication and make benchmark reports clearer, consider iterating over a shared list of sizes and ensuring the benchmark ID includes the size (so the three `rs_width` and three `rs_height` runs are clearly distinguishable in Criterion output).
```suggestion
let sizes = [(64, 64), (256, 256), (1024, 1024)];
for (width, height) in sizes {
let bench_id = format!("rs_size_{}x{}", width, height);
// RS_Width(raster)
benchmark::scalar(c, &f, &bench_id, "rs_width", Raster(width, height));
// RS_Height(raster)
benchmark::scalar(c, &f, &bench_id, "rs_height", Raster(width, height));
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org