MCPcopy Create free account
hub / github.com/apache/datafusion / run

Method run

benchmarks/src/imdb/run.rs:288–305  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

286
287impl RunOpt {
288 pub async fn run(self) -> Result<()> {
289 println!("Running benchmarks with the following options: {self:?}");
290 let query_range = match self.query {
291 Some(query_id) => query_id..=query_id,
292 None => IMDB_QUERY_START_ID..=IMDB_QUERY_END_ID,
293 };
294
295 let mut benchmark_run = BenchmarkRun::new();
296 for query_id in query_range {
297 benchmark_run.start_new_case(&format!("Query {query_id}"));
298 let query_run = self.benchmark_query(query_id).await?;
299 for iter in query_run {
300 benchmark_run.write_iter(iter.elapsed, iter.row_count);
301 }
302 }
303 benchmark_run.maybe_write_json(self.output_path.as_ref())?;
304 Ok(())
305 }
306
307 async fn benchmark_query(&self, query_id: usize) -> Result<Vec<QueryResult>> {
308 let mut config = self

Callers

nothing calls this directly

Calls 6

newFunction · 0.85
start_new_caseMethod · 0.80
write_iterMethod · 0.80
maybe_write_jsonMethod · 0.80
benchmark_queryMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected