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

Function criterion_benchmark

datafusion/core/benches/csv_load.rs:64–93  ·  view source on GitHub ↗
(c: &mut Criterion)

Source from the content-addressed store, hash-verified

62}
63
64fn criterion_benchmark(c: &mut Criterion) {
65 let ctx = create_context().unwrap();
66 let rt = Runtime::new().unwrap();
67 let test_file = generate_test_file();
68
69 let mut group = c.benchmark_group("load csv testing");
70 group.measurement_time(Duration::from_secs(20));
71
72 group.bench_function("default csv read options", |b| {
73 b.iter(|| {
74 load_csv(
75 ctx.clone(),
76 &rt,
77 test_file.path().to_str().unwrap(),
78 CsvReadOptions::default(),
79 )
80 })
81 });
82
83 group.bench_function("null regex override", |b| {
84 b.iter(|| {
85 load_csv(
86 ctx.clone(),
87 &rt,
88 test_file.path().to_str().unwrap(),
89 CsvReadOptions::default().null_regex(Some("^NULL$|^$".to_string())),
90 )
91 })
92 });
93}
94
95criterion_group!(benches, criterion_benchmark);
96criterion_main!(benches);

Callers

nothing calls this directly

Calls 9

newFunction · 0.85
generate_test_fileFunction · 0.85
load_csvFunction · 0.85
null_regexMethod · 0.80
create_contextFunction · 0.70
iterMethod · 0.45
cloneMethod · 0.45
pathMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…