(c: &mut Criterion)
| 269 | } |
| 270 | |
| 271 | fn criterion_benchmark(c: &mut Criterion) { |
| 272 | // verify that we can load the clickbench data prior to running the benchmark |
| 273 | if !PathBuf::from(format!("{BENCHMARKS_PATH_1}{CLICKBENCH_DATA_PATH}")).exists() |
| 274 | && !PathBuf::from(format!("{BENCHMARKS_PATH_2}{CLICKBENCH_DATA_PATH}")).exists() |
| 275 | { |
| 276 | panic!( |
| 277 | "benchmarks/data/hits_partitioned/ could not be loaded. Please run \ |
| 278 | 'benchmarks/bench.sh data clickbench_partitioned' prior to running this benchmark" |
| 279 | ) |
| 280 | } |
| 281 | |
| 282 | let ctx = create_context(); |
| 283 | let rt = Runtime::new().unwrap(); |
| 284 | |
| 285 | // Test simplest |
| 286 | // https://github.com/apache/datafusion/issues/5157 |
| 287 | c.bench_function("logical_select_one_from_700", |b| { |
| 288 | b.iter(|| logical_plan(&ctx, &rt, "SELECT c1 FROM t700")) |
| 289 | }); |
| 290 | |
| 291 | // Test simplest |
| 292 | // https://github.com/apache/datafusion/issues/5157 |
| 293 | c.bench_function("physical_select_one_from_700", |b| { |
| 294 | b.iter(|| physical_plan(&ctx, &rt, "SELECT c1 FROM t700")) |
| 295 | }); |
| 296 | |
| 297 | // Test simplest |
| 298 | c.bench_function("logical_select_all_from_1000", |b| { |
| 299 | b.iter(|| logical_plan(&ctx, &rt, "SELECT * FROM t1000")) |
| 300 | }); |
| 301 | |
| 302 | // Test simplest |
| 303 | c.bench_function("physical_select_all_from_1000", |b| { |
| 304 | b.iter(|| physical_plan(&ctx, &rt, "SELECT * FROM t1000")) |
| 305 | }); |
| 306 | |
| 307 | c.bench_function("logical_trivial_join_low_numbered_columns", |b| { |
| 308 | b.iter(|| { |
| 309 | logical_plan( |
| 310 | &ctx, |
| 311 | &rt, |
| 312 | "SELECT t1.a2, t2.b2 \ |
| 313 | FROM t1, t2 WHERE a1 = b1", |
| 314 | ) |
| 315 | }) |
| 316 | }); |
| 317 | |
| 318 | c.bench_function("logical_trivial_join_high_numbered_columns", |b| { |
| 319 | b.iter(|| { |
| 320 | logical_plan( |
| 321 | &ctx, |
| 322 | &rt, |
| 323 | "SELECT t1.a99, t2.b99 \ |
| 324 | FROM t1, t2 WHERE a199 = b199", |
| 325 | ) |
| 326 | }) |
| 327 | }); |
| 328 |
nothing calls this directly
no test coverage detected
searching dependent graphs…