mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
Test benchmarks and Improve benchmark README.md (#1627)
This commit is contained in:
parent
fe36020890
commit
3bad04e9e8
3 changed files with 522 additions and 1 deletions
8
.github/workflows/rust.yml
vendored
8
.github/workflows/rust.yml
vendored
|
@ -37,6 +37,14 @@ jobs:
|
||||||
uses: ./.github/actions/setup-builder
|
uses: ./.github/actions/setup-builder
|
||||||
- run: cargo clippy --all-targets --all-features -- -D warnings
|
- run: cargo clippy --all-targets --all-features -- -D warnings
|
||||||
|
|
||||||
|
benchmark-lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup Rust Toolchain
|
||||||
|
uses: ./.github/actions/setup-builder
|
||||||
|
- run: cd sqlparser_bench && cargo clippy --all-targets --all-features -- -D warnings
|
||||||
|
|
||||||
compile:
|
compile:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -17,4 +17,26 @@
|
||||||
under the License.
|
under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
Benchmarks for sqlparser. See [the main README](../README.md) for more information.
|
Benchmarks for sqlparser. See [the main README](../README.md) for more information.
|
||||||
|
|
||||||
|
Note: this is in a separate, non workspace crate to avoid adding a dependency
|
||||||
|
on `criterion` to the main crate (which complicates testing without std).
|
||||||
|
|
||||||
|
# Running Benchmarks
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cargo bench --bench sqlparser_bench
|
||||||
|
```
|
||||||
|
|
||||||
|
# Profiling
|
||||||
|
|
||||||
|
Note you can generate a [flamegraph] using the following command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cargo flamegraph --bench sqlparser_bench
|
||||||
|
```
|
||||||
|
|
||||||
|
[flamegraph]: https://crates.io/crates/flamegraph
|
||||||
|
|
||||||
|
Here is an example flamegraph:
|
||||||
|

|
||||||
|
|
491
sqlparser_bench/img/flamegraph.svg
Normal file
491
sqlparser_bench/img/flamegraph.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 1.5 MiB |
Loading…
Add table
Add a link
Reference in a new issue