alamb commented on a change in pull request #1838:
URL: https://github.com/apache/arrow-datafusion/pull/1838#discussion_r807344947
##########
File path: datafusion/benches/parquet_query_sql.rs
##########
@@ -229,7 +229,7 @@ fn criterion_benchmark(c: &mut Criterion) {
});
}
- // Clean up temporary file if any
+ // Temporary file must outlive the benchmarks, it is deleted when dropped
Review comment:
sorry I needed the dopamine hit of clicking the green button -- I should
have waited
##########
File path: DEVELOPERS.md
##########
@@ -113,6 +113,42 @@ psql -d "$POSTGRES_DB" -h "$POSTGRES_HOST" -p
"$POSTGRES_PORT" -U "$POSTGRES_USE
python -m pytest -v integration-tests/test_psql_parity.py
```
+## Benchmarks
+
+### Criterion Benchmarks
+
+[Criterion](https://docs.rs/criterion/latest/criterion/index.html) is a
statistics-driven micro-benchmarking framework used by Datafusion for
evaluating the performance of specific code-paths. In particular, the criterion
benchmarks help to both guide optimisation efforts, and prevent performance
regressions within Datafusion.
+
+Criterion integrates with Cargo's built-in [benchmark
support](https://doc.rust-lang.org/cargo/commands/cargo-bench.html) and a given
benchmark can be run with
+
+```
+cargo bench --bench BENCHMARK_NAME
+```
+
+A full list of benchmarks can be found [here](./datafusion/benches).
+
+_[cargo-criterion](https://github.com/bheisler/cargo-criterion) may also be
used for more advanced reporting._
+
+#### Parquet SQL Benchmarks
+
+The parquet SQL benchmarks can be run with
+
+```
+ cargo bench --bench parquet_query_sql
+```
+
+These randomly generate a parquet file, and then benchmark queries sourced
from [parquet_query_sql.sql](./datafusion/benches/parquet_query_sql.sql)
against it. This can therefore be a quick way to add coverage of particular
query and/or data paths.
Review comment:
👍
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]