A benchmark of filtering fragments in a dataset.
| 60 | |
| 61 | // A benchmark of filtering fragments in a dataset. |
| 62 | static 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 | |
| 72 | static void GetFilteredFragments(benchmark::State& state, compute::Expression filter) { |
| 73 | auto dataset = GetDataset(); |
nothing calls this directly
no test coverage detected