(c: &mut Criterion)
| 42 | } |
| 43 | |
| 44 | fn validate_benchmark(c: &mut Criterion) { |
| 45 | //Binary Array |
| 46 | c.bench_function("validate_binary_array_data 20000", |b| { |
| 47 | b.iter(|| create_binary_array_data(20000)) |
| 48 | }); |
| 49 | |
| 50 | //Utf8 Array |
| 51 | let str_arr = StringArray::from(vec!["test"; 20000]).to_data(); |
| 52 | c.bench_function("validate_utf8_array_data 20000", |b| { |
| 53 | b.iter(|| validate_utf8_array(&str_arr)) |
| 54 | }); |
| 55 | |
| 56 | let byte_array = BinaryArray::from_iter_values(std::iter::repeat_n(b"test", 20000)); |
| 57 | c.bench_function("byte_array_to_string_array 20000", |b| { |
| 58 | b.iter(|| StringArray::from(BinaryArray::from(byte_array.to_data()))) |
| 59 | }); |
| 60 | } |
| 61 | |
| 62 | criterion_group!(benches, validate_benchmark); |
| 63 | criterion_main!(benches); |
nothing calls this directly
no test coverage detected