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

Function CreateRandomBuffer

cpp/src/arrow/util/bitmap_reader_benchmark.cc:45–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43// const int seed = std::rand();
44
45static std::shared_ptr<Buffer> CreateRandomBuffer(int64_t nbytes) {
46 auto buffer = *AllocateBuffer(nbytes);
47 memset(buffer->mutable_data(), 0, nbytes);
48 random_bytes(nbytes, /*seed=*/0, buffer->mutable_data());
49 return buffer;
50}
51
52static void BitBlockCounterBench(benchmark::State& state) {
53 int64_t nbytes = state.range(0);

Callers 2

BitBlockCounterBenchFunction · 0.70
BitmapWordReaderBenchFunction · 0.70

Calls 3

AllocateBufferFunction · 0.50
random_bytesFunction · 0.50
mutable_dataMethod · 0.45

Tested by

no test coverage detected