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

Method AddLatency

cpp/src/arrow/flight/flight_benchmark.cc:111–114  ·  view source on GitHub ↗

Invoked per batch in the test loop. Holding a lock looks not scalable. Tested with 1 ~ 8 threads, no noticeable overhead is observed. A better approach may be calculate per-thread quantiles and merge.

Source from the content-addressed store, hash-verified

109 // Tested with 1 ~ 8 threads, no noticeable overhead is observed.
110 // A better approach may be calculate per-thread quantiles and merge.
111 void AddLatency(uint64_t elapsed_nanos) {
112 std::lock_guard<std::mutex> lock(this->mutex);
113 latencies.Add(static_cast<double>(elapsed_nanos));
114 }
115
116 // ns -> us
117 uint64_t max_latency() const { return latencies.Max() / 1000; }

Callers 2

RunDoGetTestFunction · 0.80
RunDoPutTestFunction · 0.80

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected