jfjoch_broker: Export writer FIFO utilization for TCP socket

This commit is contained in:
2026-03-05 19:59:23 +01:00
parent 512023f5f6
commit 1758417702
13 changed files with 157 additions and 9 deletions
+12
View File
@@ -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;
}