MCPcopy Create free account
hub / github.com/apache/arrow-rs / validate_benchmark

Function validate_benchmark

arrow/benches/array_data_validate.rs:44–60  ·  view source on GitHub ↗
(c: &mut Criterion)

Source from the content-addressed store, hash-verified

42}
43
44fn 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
62criterion_group!(benches, validate_benchmark);
63criterion_main!(benches);

Callers

nothing calls this directly

Calls 4

create_binary_array_dataFunction · 0.85
validate_utf8_arrayFunction · 0.85
iterMethod · 0.45
to_dataMethod · 0.45

Tested by

no test coverage detected