Commit bdc6bc20 authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Extract pacing rate. Update app_limited.

parent 7f88c93b
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -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;
+5 −0
Original line number Diff line number Diff line
@@ -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);
}
+1 −0
Original line number Diff line number Diff line
@@ -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
+6 −0
Original line number Diff line number Diff line
@@ -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: