Commit a6ba8861 authored by Andreas Schmidt's avatar Andreas Schmidt

+= expose additional paces via Cython

parent 4e8f2461
Pipeline #3756 failed with stages
in 2 minutes and 11 seconds
......@@ -476,4 +476,4 @@ prrtByteCount_t BBR_getSendQuantum(BBR* bbr) {
error:
PERROR("BBR_getSendQuantum failed.")
return 0;
}
\ No newline at end of file
}
......@@ -12,7 +12,7 @@
#define PROBE_GAIN 1.1
#define DRAIN_GAIN 0.9
#define RTpropFilterLen 10000000 //10s
#define RTpropFilterLen 2000000 //10s
#define BBRHighGain ((((float)2885) / 1000) + 1)
#define BBRGainCycleLen 8
#define ProbeRTTDuration 200000 //200ms
......
......@@ -571,8 +571,8 @@ uint32_t PrrtSocket_get_sock_opt(PrrtSocket *s, const char *name) {
} else if(strcmp(name, "appSend_pace_effective") == 0) {
return PrrtPace_get_effective(s->appSendPace);
} else if(strcmp(name, "appSend_pace_total") == 0) {
return PrrtPace_get_total(s->appSendPace);
return PrrtPace_get_total(s->appSendPace);
} else if(strcmp(name, "prrtTransmit_pace_internal") == 0) {
return PrrtPace_get_internal(s->prrtTransmitPace);
} else if(strcmp(name, "prrtTransmit_pace_dependent") == 0) {
......@@ -582,8 +582,8 @@ uint32_t PrrtSocket_get_sock_opt(PrrtSocket *s, const char *name) {
} else if(strcmp(name, "prrtTransmit_pace_effective") == 0) {
return PrrtPace_get_effective(s->prrtTransmitPace);
} else if(strcmp(name, "prrtTransmit_pace_total") == 0) {
return PrrtPace_get_total(s->prrtTransmitPace);
return PrrtPace_get_total(s->prrtTransmitPace);
} else if(strcmp(name, "prrtReceive_pace_internal") == 0) {
return PrrtPace_get_internal(s->prrtReceivePace);
} else if(strcmp(name, "prrtReceive_pace_dependent") == 0) {
......@@ -593,8 +593,8 @@ uint32_t PrrtSocket_get_sock_opt(PrrtSocket *s, const char *name) {
} else if(strcmp(name, "prrtReceive_pace_effective") == 0) {
return PrrtPace_get_effective(s->prrtReceivePace);
} else if(strcmp(name, "prrtReceive_pace_total") == 0) {
return PrrtPace_get_total(s->prrtReceivePace);
return PrrtPace_get_total(s->prrtReceivePace);
} else if(strcmp(name, "appDeliver_pace_internal") == 0) {
return PrrtPace_get_internal(s->appDeliverPace);
} else if(strcmp(name, "appDeliver_pace_dependent") == 0) {
......@@ -604,8 +604,8 @@ uint32_t PrrtSocket_get_sock_opt(PrrtSocket *s, const char *name) {
} else if(strcmp(name, "appDeliver_pace_effective") == 0) {
return PrrtPace_get_effective(s->appDeliverPace);
} else if(strcmp(name, "appDeliver_pace_total") == 0) {
return PrrtPace_get_total(s->appDeliverPace);
return PrrtPace_get_total(s->appDeliverPace);
} else if (strcmp(name, "send_peer_btl_pace") == 0) {
return s->send_peer_btl_pace;
} else if (strcmp(name, "recv_peer_btl_pace") == 0) {
......
......@@ -161,11 +161,13 @@ class PrrtPace:
return self.internal + self.external - self.dependent
class PrrtPaces:
def __init__(self, appSend, prrtTransmit, prrtReceive, appDeliver):
def __init__(self, appSend, prrtTransmit, prrtReceive, appDeliver, peerPace, networkPace):
self.appSend = appSend
self.prrtTransmit = prrtTransmit
self.prrtReceive = prrtReceive
self.appDeliver = appDeliver
self.peerPace = peerPace
self.networkPace = networkPace
cdef class PrrtSocket:
cdef cprrt.PrrtSocket* _c_socket
......@@ -238,7 +240,10 @@ cdef class PrrtSocket:
cprrt.PrrtSocket_get_sock_opt(self._c_socket, "appDeliver_pace_dependent") * 0.000001,
cprrt.PrrtSocket_get_sock_opt(self._c_socket, "appDeliver_pace_external") * 0.000001)
return PrrtPaces(appSend, prrtTransmit, prrtReceive, appDeliver)
peerPace = cprrt.PrrtSocket_get_sock_opt(self._c_socket, "recv_peer_btl_pace") * 0.000001
networkPace = cprrt.PrrtSocket_get_sock_opt(self._c_socket, "nw_pace") * 0.000001
return PrrtPaces(appSend, prrtTransmit, prrtReceive, appDeliver, peerPace, networkPace)
property nw_pace:
def __get__(self):
......
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