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

improve individual test matching and output #9

Conversation

yliang412
Copy link
Contributor

Adding the ability to match selected test modules or files. Also display test names with module hierarchy.

  • can match globs in planner test apply.
  • show module hierarchy in both apply + tests.

Before

$ cargo run -p naivedb --bin apply
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.03s
     Running `target/debug/apply`
[DONE] ok.yml, took 1 ms
[DONE] error.yml, took 1 ms

$ cargo nextest run -p naivedb ok
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.02s
------------
 Nextest run ID 44de9a31-bc77-41c3-90d5-def47c4694dd with nextest profile: default
    Starting 1 test across 3 binaries (1 test skipped)
        PASS [   0.005s] naivedb::plannertest ok
------------
     Summary [   0.005s] 1 test run: 1 passed, 1 skipped

After

$ cargo run -p naivedb --bin apply -- basics ok
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.09s
     Running `target/debug/apply basics ok`
[DONE] basics/create.yml, took 1 ms
[DONE] basics/select.yml, took 1 ms
[DONE] ok.yml, took 1 ms

$ cargo nextest run -p naivedb basics::create ok
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.02s
------------
 Nextest run ID 3789c774-11bc-4d06-98ec-2d8dde74789e with nextest profile: default
    Starting 2 tests across 3 binaries (2 tests skipped)
        PASS [   0.005s] naivedb::plannertest basics::create
        PASS [   0.004s] naivedb::plannertest ok
------------
     Summary [   0.005s] 2 tests run: 2 passed, 2 skipped

yliang412 and others added 5 commits December 7, 2024 12:53
Signed-off-by: Yuchen Liang <[email protected]>
Signed-off-by: Yuchen Liang <[email protected]>
Signed-off-by: Alex Chi <[email protected]>
@skyzh skyzh enabled auto-merge (squash) December 7, 2024 19:24
@skyzh skyzh merged commit 992383c into risinglightdb:main Dec 7, 2024
3 checks passed
@yliang412 yliang412 deleted the yuchen/match-and-output-better-test-hierarchy branch December 7, 2024 22:41
yliang412 added a commit to cmu-db/optd that referenced this pull request Dec 10, 2024
…ution (#262)

Part of #263.

## Problem 

There is a lack of performance evaluation in optd. Without proper
benchmarking, we will not know if some changes cause significant
regression in performance. We should keep track of the two aspects of
optimizer performance:

- plan generation time 
- actual execution time

## Summary of changes

- Add a [Criterion-rs](https://bheisler.github.io/criterion.rs/book/)
based benchmark to measure optd performance.
- Use the `sqlplannertest` yaml-based setup, bench if there is a `bench`
task.
- Bump `sqlplannertest` to version 0.4.
- better individual test matching added in
risinglightdb/sqlplannertest-rs#9

Planning:
  - Input: SQL statement (aka `datafusion_sql::parser::Statement`).
  - Measures the time it takes to generate a datafusion physical plan.

Execution:
- Input: datafusion physical plan outputted from optd (aka `Arc<dyn
ExecutionPlan>`).
- Measures the time it takes to execute the entire query.

## Next Steps
https://github.com/benchmark-action/github-action-benchmark can directly
take `cargo bench` results as input. So it will be easy to set up CI.

---------

Signed-off-by: Yuchen Liang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants