Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test benchmarks and Improve benchmark README.md #1627

Merged
merged 4 commits into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ jobs:
uses: ./.github/actions/setup-builder
- 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:
runs-on: ubuntu-latest
steps:
Expand Down
24 changes: 23 additions & 1 deletion sqlparser_bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,26 @@
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:
![flamegraph](img/flamegraph.svg)
Loading
Loading