Skip to content

Commit 13b731c

Browse files
Improve benchmark documentation (#15054)
* Replace placeholder with a more appropriate benchmark title * Clarify purpose of this benchmark * Add cancellation benchmark to benchmarks README
1 parent 2458693 commit 13b731c

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

benchmarks/README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,37 @@ Your benchmark should create and use an instance of `BenchmarkRun` defined in `b
329329

330330
# Benchmarks
331331

332-
The output of `dfbench` help includes a description of each benchmark, which is reproduced here for convenience
332+
The output of `dfbench` help includes a description of each benchmark, which is reproduced here for convenience.
333+
334+
## Cancellation
335+
336+
Test performance of cancelling queries
337+
Queries in DataFusion should stop executing "quickly" after they are
338+
cancelled (the output stream is dropped).
339+
340+
The queries are executed on a synthetic dataset generated during
341+
the benchmark execution that is an anonymized version of a
342+
real-world data set.
343+
344+
The query is an anonymized version of a real-world query, and the
345+
test starts the query then cancels it and reports how long it takes
346+
for the runtime to fully exit.
347+
348+
Example output:
349+
350+
```
351+
Using 7 files found on disk
352+
Starting to load data into in-memory object store
353+
Done loading data into in-memory object store
354+
in main, sleeping
355+
Starting spawned
356+
Creating logical plan...
357+
Creating physical plan...
358+
Executing physical plan...
359+
Getting results...
360+
cancelling thread
361+
done dropping runtime in 83.531417ms
362+
```
333363

334364
## ClickBench
335365

benchmarks/src/cancellation.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ use tokio_util::sync::CancellationToken;
4747

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

99102
let mut rundata = BenchmarkRun::new();
100-
rundata.start_new_case("Arglebargle");
103+
rundata.start_new_case("Cancellation");
101104

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

0 commit comments

Comments
 (0)