Commit bdc6bc20 authored by Andreas Schmidt's avatar Andreas Schmidt

Extract pacing rate. Update app_limited.

parent 7f88c93b
Pipeline #2105 failed with stages
in 21 seconds
......@@ -154,6 +154,7 @@ cdef extern from "proto/socket.h":
float PrrtSocket_get_pacing_gain(PrrtSocket *s)
uint32_t PrrtSocket_get_cwnd(PrrtSocket *s)
uint32_t PrrtSocket_get_inflight(PrrtSocket *s)
uint32_t PrrtSocket_get_pacing_rate(PrrtSocket *s)
bint PrrtSocket_get_app_limited(PrrtSocket *socket)
......
......@@ -118,7 +118,7 @@ void PrrtReceiver_on_application_write(PrrtReceiver* receiver) {
PrrtPacketTracking *tracking = receiver->packetTracking;
if(PrrtInFlightPacketStore_get_queue_size(receiver->dataInflightPacketStore) +
PrrtInFlightPacketStore_get_queue_size(receiver->redundancyInflightPacketStore) == 0) {
tracking->app_limited = (tracking->delivered + tracking->pipe) ? : 1;
tracking->app_limited = (tracking->delivered + tracking->packets_in_flight) ? : 1;
}
check(pthread_mutex_unlock(&receiver->lock) == 0, "Unlock failed.");
return;
......
......@@ -637,6 +637,11 @@ float PrrtSocket_get_pacing_gain(PrrtSocket *s) {
return BBR_getPacingGain(s->receiver->bbr);
}
uint32_t PrrtSocket_get_pacing_rate(PrrtSocket *s) {
return BBR_getPacingRate(s->receiver->bbr);
}
uint32_t PrrtSocket_get_cycle_index(PrrtSocket *s) {
return BBR_getCycleIndex(s->receiver->bbr);
}
......
......@@ -145,6 +145,7 @@ uint32_t PrrtSocket_get_cycle_index(PrrtSocket *s);
float PrrtSocket_get_pacing_gain(PrrtSocket *s);
uint32_t PrrtSocket_get_cwnd(PrrtSocket *s);
uint32_t PrrtSocket_get_inflight(PrrtSocket *s);
uint32_t PrrtSocket_get_pacing_rate(PrrtSocket *s);
#endif // PRRT_SOCKET_H
......@@ -235,6 +235,12 @@ cdef class PrrtSocket:
raise Exception("Not a sender.")
return cprrt.PrrtSocket_get_inflight(self._c_socket)
property bbr_pacing_rate:
def __get__(self):
if not self.isSender:
raise Exception("Not a sender.")
return cprrt.PrrtSocket_get_pacing_rate(self._c_socket)
property app_limited:
def __get__(self):
if not self.isSender:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment