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

Method NextLatency

cpp/src/arrow/io/slow.cc:48–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 latency_dist_(average_latency, average_latency * kStandardDeviationRatio) {}
47
48 double NextLatency() override {
49 // std::random distributions are unlikely to be thread-safe, and
50 // a RandomAccessFile may be called from multiple threads
51 std::lock_guard<std::mutex> lock(mutex_);
52 return std::max<double>(0.0, latency_dist_(gen_));
53 }
54
55 private:
56 std::default_random_engine gen_;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected