jfjoch_broker: Export writer FIFO utilization for TCP socket
This commit is contained in:
@@ -592,6 +592,8 @@ void TCPStreamPusher::PersistentAckThread(Connection* c) {
|
||||
break;
|
||||
}
|
||||
|
||||
c->last_ack_fifo_occupancy.store(h.ack_fifo_occupancy, std::memory_order_relaxed);
|
||||
|
||||
// ACK frame — forward to data-collection ack logic
|
||||
std::string error_text;
|
||||
if (h.payload_size > 0) {
|
||||
@@ -1143,3 +1145,13 @@ std::optional<uint64_t> TCPStreamPusher::GetImagesWritten() const {
|
||||
std::optional<uint64_t> TCPStreamPusher::GetImagesWriteError() const {
|
||||
return total_data_acked_bad.load(std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
std::vector<int64_t> TCPStreamPusher::GetWriterFifoUtilization() const {
|
||||
std::vector<int64_t> ret;
|
||||
std::lock_guard lg(connections_mutex);
|
||||
ret.reserve(connections.size());
|
||||
for (const auto& c : connections) {
|
||||
ret.push_back(c->last_ack_fifo_occupancy.load(std::memory_order_relaxed));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user