Skip to content

Improve benchmark documentation #15054

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

Merged
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
32 changes: 31 additions & 1 deletion benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,37 @@ Your benchmark should create and use an instance of `BenchmarkRun` defined in `b

# Benchmarks

The output of `dfbench` help includes a description of each benchmark, which is reproduced here for convenience
The output of `dfbench` help includes a description of each benchmark, which is reproduced here for convenience.

## Cancellation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️


Test performance of cancelling queries
Queries in DataFusion should stop executing "quickly" after they are
cancelled (the output stream is dropped).

The queries are executed on a synthetic dataset generated during
the benchmark execution that is an anonymized version of a
real-world data set.

The query is an anonymized version of a real-world query, and the
test starts the query then cancels it and reports how long it takes
for the runtime to fully exit.

Example output:

```
Using 7 files found on disk
Starting to load data into in-memory object store
Done loading data into in-memory object store
in main, sleeping
Starting spawned
Creating logical plan...
Creating physical plan...
Executing physical plan...
Getting results...
cancelling thread
done dropping runtime in 83.531417ms
```

## ClickBench

Expand Down
5 changes: 4 additions & 1 deletion benchmarks/src/cancellation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ use tokio_util::sync::CancellationToken;

/// Test performance of cancelling queries
///
/// Queries in DataFusion should stop executing "quickly" after they are
/// cancelled (the output stream is dropped).
///
/// The queries are executed on a synthetic dataset generated during
/// the benchmark execution that is an anonymized version of a
/// real-world data set.
Expand Down Expand Up @@ -97,7 +100,7 @@ impl RunOpt {
println!("Done loading data into in-memory object store");

let mut rundata = BenchmarkRun::new();
rundata.start_new_case("Arglebargle");
rundata.start_new_case("Cancellation");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦 -- sorry about that.

Though today I have learned a new placeholder word!


for i in 0..self.common.iterations {
let elapsed = run_test(self.wait_time, Arc::clone(&store))?;
Expand Down