small refactor and print in flight packages when timing out

This commit is contained in:
2024-05-31 17:03:22 +02:00
parent c52ac19285
commit 0eb30246a8
4 changed files with 14 additions and 6 deletions

View File

@@ -98,6 +98,10 @@ std::vector<FlowOnly::SeqIDType> FlowOnly::getTimeouts(void) const {
return list;
}
int64_t FlowOnly::inFlightCount(void) const {
return _in_flight.size();
}
void FlowOnly::onSent(SeqIDType seq, size_t data_size) {
if constexpr (true) {
for (const auto& it : _in_flight) {
@@ -105,15 +109,15 @@ void FlowOnly::onSent(SeqIDType seq, size_t data_size) {
}
}
_in_flight.push_back(
const auto& new_entry = _in_flight.emplace_back(
FlyingBunch{
seq,
static_cast<float>(getTimeNow()),
data_size + SEGMENT_OVERHEAD
data_size + SEGMENT_OVERHEAD,
false
}
);
_in_flight_bytes += data_size + SEGMENT_OVERHEAD;
//_recently_sent_bytes += data_size + SEGMENT_OVERHEAD;
_in_flight_bytes += new_entry.bytes;
_time_point_last_update = getTimeNow();
}