This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 13b731c469 Improve benchmark documentation (#15054)
13b731c469 is described below

commit 13b731c469d095af24326648e22c05732d79a69b
Author: Carol (Nichols || Goulding) 
<[email protected]>
AuthorDate: Fri Mar 7 15:36:25 2025 -0500

    Improve benchmark documentation (#15054)
    
    * Replace placeholder with a more appropriate benchmark title
    
    * Clarify purpose of this benchmark
    
    * Add cancellation benchmark to benchmarks README
---
 benchmarks/README.md           | 32 +++++++++++++++++++++++++++++++-
 benchmarks/src/cancellation.rs |  5 ++++-
 2 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/benchmarks/README.md b/benchmarks/README.md
index c0bdb1dba7..40d467b5bb 100644
--- a/benchmarks/README.md
+++ b/benchmarks/README.md
@@ -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
+
+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
 
diff --git a/benchmarks/src/cancellation.rs b/benchmarks/src/cancellation.rs
index 3c3ca424a3..f5740bdc96 100644
--- a/benchmarks/src/cancellation.rs
+++ b/benchmarks/src/cancellation.rs
@@ -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.
@@ -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");
 
         for i in 0..self.common.iterations {
             let elapsed = run_test(self.wait_time, Arc::clone(&store))?;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to