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

Function FromString

cpp/src/arrow/util/decimal_benchmark.cc:56–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56static void FromString(benchmark::State& state) { // NOLINT non-const reference
57 const std::vector<std::string>& values = GetValuesAsString();
58 for (auto _ : state) {
59 for (const auto& value : values) {
60 Decimal128 dec;
61 int32_t scale, precision;
62 auto status = Decimal128::FromString(value, &dec, &scale, &precision);
63 benchmark::DoNotOptimize(status);
64 }
65 }
66 state.SetItemsProcessed(state.iterations() * values.size());
67}
68
69static void ToString(benchmark::State& state) { // NOLINT non-const reference
70 static const std::vector<DecimalValueAndScale> values = GetDecimalValuesAndScales();

Callers 15

DecimalFromStdStringFunction · 0.85
TestSessionFunction · 0.85
VisitMethod · 0.85
BaseBinaryScalarMethod · 0.85
FixedSizeBinaryScalarMethod · 0.85
FinishWithBufferMethod · 0.85
FormatToBufferFunction · 0.85
CastImplFunction · 0.85
TESTFunction · 0.85
TestMakeScalarMethod · 0.85
TestValidateErrorsMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by 15

TestSessionFunction · 0.68
TESTFunction · 0.68
TestMakeScalarMethod · 0.68
TestValidateErrorsMethod · 0.68
TestValidateErrorsMethod · 0.68
SetUpMethod · 0.68
TESTFunction · 0.68
TEST_FFunction · 0.68
GetFileSourceMethod · 0.68
WriteMethod · 0.68
ToFileSourceFunction · 0.68
TESTFunction · 0.68