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

Function SetupPipeWriter

cpp/src/arrow/io/file_benchmark.cc:188–193  ·  view source on GitHub ↗

Set up a pipe with an OutputStream at one end and a BackgroundReader at the other end.

Source from the content-addressed store, hash-verified

186// Set up a pipe with an OutputStream at one end and a BackgroundReader at
187// the other end.
188static void SetupPipeWriter(std::shared_ptr<io::OutputStream>* stream,
189 std::shared_ptr<BackgroundReader>* reader) {
190 auto pipe = *internal::CreatePipe();
191 *stream = *io::FileOutputStream::Open(pipe.wfd.Detach());
192 *reader = BackgroundReader::StartReader(pipe.rfd.Detach());
193}
194
195static void BenchmarkStreamingWrites(benchmark::State& state,
196 const std::valarray<int64_t>& sizes,

Calls 2

CreatePipeFunction · 0.85
DetachMethod · 0.45

Tested by

no test coverage detected