| 232 | |
| 233 | template <typename ARROW_TYPE, typename C_TYPE = typename ARROW_TYPE::c_type> |
| 234 | static void IntegerFormatting(benchmark::State& state) { // NOLINT non-const reference |
| 235 | std::vector<C_TYPE> values = MakeInts<C_TYPE>(1000); |
| 236 | StringFormatter<ARROW_TYPE> formatter; |
| 237 | |
| 238 | while (state.KeepRunning()) { |
| 239 | DummyAppender appender; |
| 240 | for (const auto value : values) { |
| 241 | ABORT_NOT_OK(formatter(value, appender)); |
| 242 | } |
| 243 | benchmark::DoNotOptimize(appender.total_); |
| 244 | } |
| 245 | state.SetItemsProcessed(state.iterations() * values.size()); |
| 246 | } |
| 247 | |
| 248 | template <typename ARROW_TYPE, typename C_TYPE = typename ARROW_TYPE::c_type> |
| 249 | static void FloatFormatting(benchmark::State& state) { // NOLINT non-const reference |