MCPcopy Create free account
hub / github.com/apache/arrow / GetAllFragments

Function GetAllFragments

cpp/src/arrow/dataset/file_benchmark.cc:62–70  ·  view source on GitHub ↗

A benchmark of filtering fragments in a dataset.

Source from the content-addressed store, hash-verified

60
61// A benchmark of filtering fragments in a dataset.
62static void GetAllFragments(benchmark::State& state) {
63 auto dataset = GetDataset();
64 for (auto _ : state) {
65 ASSERT_OK_AND_ASSIGN(auto fragments, dataset.dataset->GetFragments());
66 ABORT_NOT_OK(fragments.Visit([](std::shared_ptr<Fragment>) { return Status::OK(); }));
67 }
68 state.SetItemsProcessed(state.iterations() * dataset.num_fragments);
69 state.counters["num_fragments"] = static_cast<double>(dataset.num_fragments);
70}
71
72static void GetFilteredFragments(benchmark::State& state, compute::Expression filter) {
73 auto dataset = GetDataset();

Callers

nothing calls this directly

Calls 3

GetDatasetFunction · 0.70
OKFunction · 0.50
VisitMethod · 0.45

Tested by

no test coverage detected