Commit 8fb384cc authored by Andreas Schmidt's avatar Andreas Schmidt

Update time-* to log paces.

parent be7387d0
Pipeline #2836 passed with stages
in 1 minute and 41 seconds
......@@ -322,7 +322,7 @@ int32_t PrrtSocket_receive_asap_wait(PrrtSocket *s, void *buf_ptr, struct sockad
PrrtPace_track_start(s->appDeliverPace);
PrrtPacket *packet;
do {
struct timespec deadline = abstime_from_now(100);
struct timespec deadline = abstime_from_now(10 * 1000);
packet = PrrtPacketDeliveryStore_get_packet_timedwait(s->packetDeliveryStore, 0, MAX_TIMESTAMP, &deadline, s->appDeliverPace);
if (packet == NULL && errno == ETIMEDOUT) {
errno = 0;
......
......@@ -132,38 +132,55 @@ static inline long long int _nw_pace(socket_t conn) {
return 0;
}
static inline long long int _app_send_pace_max(socket_t conn) {
static inline long long int _app_send_pace_internal(socket_t conn) {
return 0;
}
static inline long long int _app_send_pace_eff(socket_t conn) {
static inline long long int _app_send_pace_dependent(socket_t conn) {
return 0;
}
static inline long long int _trans_transmit_pace_max(socket_t conn) {
static inline long long int _app_send_pace_external(socket_t conn) {
return 0;
}
static inline long long int _trans_transmit_pace_eff(socket_t conn) {
static inline long long int _trans_transmit_pace_internal(socket_t conn) {
return 0;
}
static inline long long int _trans_receive_pace_max(socket_t conn) {
static inline long long int _trans_transmit_pace_dependent(socket_t conn) {
return 0;
}
static inline long long int _trans_receive_pace_eff(socket_t conn) {
static inline long long int _trans_transmit_pace_external(socket_t conn) {
return 0;
}
static inline long long int _app_deliver_pace_max(socket_t conn) {
static inline long long int _trans_receive_pace_internal(socket_t conn) {
return 0;
}
static inline long long int _app_deliver_pace_eff(socket_t conn) {
static inline long long int _trans_receive_pace_dependent(socket_t conn) {
return 0;
}
static inline long long int _trans_receive_pace_external(socket_t conn) {
return 0;
}
static inline long long int _app_deliver_pace_internal(socket_t conn) {
return 0;
}
static inline long long int _app_deliver_pace_dependent(socket_t conn) {
return 0;
}
static inline long long int _app_deliver_pace_external(socket_t conn) {
return 0;
}
#else
# define PROTOCOL "prrt"
......@@ -223,38 +240,53 @@ static inline long long int _nw_pace(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "nw_pace");
}
static inline long long int _app_send_pace_max(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "app_send_max_pace");
static inline long long int _app_send_pace_internal(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "appSend_pace_internal");
}
static inline long long int _app_send_pace_dependent(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "appSend_pace_dependent");
}
static inline long long int _app_send_pace_eff(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "app_send_eff_pace");
static inline long long int _app_send_pace_external(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "appSend_pace_external");
}
static inline long long int _trans_transmit_pace_max(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "prrt_transmit_max_pace");
static inline long long int _trans_transmit_pace_internal(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "prrtTransmit_pace_internal");
}
static inline long long int _trans_transmit_pace_eff(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "prrt_transmit_eff_pace");
static inline long long int _trans_transmit_pace_dependent(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "prrtTransmit_pace_dependent");
}
static inline long long int _trans_receive_pace_max(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "prrt_receive_max_pace");
static inline long long int _trans_transmit_pace_external(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "prrtTransmit_pace_external");
}
static inline long long int _trans_receive_pace_eff(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "prrt_receive_eff_pace");
static inline long long int _trans_receive_pace_internal(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "prrtReceive_pace_internal");
}
static inline long long int _app_deliver_pace_max(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "app_deliver_max_pace");
static inline long long int _trans_receive_pace_dependent(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "prrtReceive_pace_dependent");
}
static inline long long int _app_deliver_pace_eff(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "app_deliver_eff_pace");
static inline long long int _trans_receive_pace_external(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "prrtReceive_pace_external");
}
static inline long long int _app_deliver_pace_internal(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "appDeliver_pace_internal");
}
static inline long long int _app_deliver_pace_dependent(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "appDeliver_pace_dependent");
}
static inline long long int _app_deliver_pace_external(socket_t conn) {
return PrrtSocket_get_sock_opt(conn, "appDeliver_pace_external");
}
#endif
......
......@@ -122,10 +122,12 @@ int main(int argc, char **argv) {
long long int *channelRTTs = calloc((size_t) rounds, sizeof(long long int));
long long int *applicationRTTs = calloc((size_t) rounds, sizeof(long long int));
long long int *trans_receive_pace_max = calloc((size_t) rounds, sizeof(long long int));
long long int *trans_receive_pace_eff = calloc((size_t) rounds, sizeof(long long int));
long long int *app_deliver_pace_max = calloc((size_t) rounds, sizeof(long long int));
long long int *app_deliver_pace_eff = calloc((size_t) rounds, sizeof(long long int));
long long int *app_deliver_pace_internal = calloc((size_t) rounds, sizeof(long long int));
long long int *app_deliver_pace_dependent = calloc((size_t) rounds, sizeof(long long int));
long long int *app_deliver_pace_external = calloc((size_t) rounds, sizeof(long long int));
long long int *trans_receive_pace_internal = calloc((size_t) rounds, sizeof(long long int));
long long int *trans_receive_pace_dependent = calloc((size_t) rounds, sizeof(long long int));
long long int *trans_receive_pace_external = calloc((size_t) rounds, sizeof(long long int));
long long int *send_peer_btl_pace = calloc((size_t) rounds, sizeof(long long int));
assert(channelRTTs && applicationRTTs);
s = _open(false, &arguments);
......@@ -152,10 +154,12 @@ int main(int argc, char **argv) {
channelRTTs[round] = timedelta(channel, old);
applicationRTTs[round] = timedelta(&now, old);
app_deliver_pace_max[round] = _app_deliver_pace_max(s);
app_deliver_pace_eff[round] = _app_deliver_pace_eff(s);
trans_receive_pace_max[round] = _trans_receive_pace_max(s);
trans_receive_pace_eff[round] = _trans_receive_pace_eff(s);
app_deliver_pace_internal[round] = _app_deliver_pace_internal(s);
app_deliver_pace_dependent[round] = _app_deliver_pace_dependent(s);
app_deliver_pace_external[round] = _app_deliver_pace_external(s);
trans_receive_pace_internal[round] = _trans_receive_pace_internal(s);
trans_receive_pace_dependent[round] = _trans_receive_pace_dependent(s);
trans_receive_pace_external[round] = _trans_receive_pace_external(s);
send_peer_btl_pace[round] = _send_peer_btl_pace(s);
i++;
if (arguments.app_delay != 0) {
......@@ -169,11 +173,19 @@ int main(int argc, char **argv) {
free(buffer);
for (i = 0; i < rounds; i++) {
fprintf(out_desc, "%u, %lli, %lli, %lli, %lli, %lli, %lli, %lli\n",
i, channelRTTs[i], applicationRTTs[i], app_deliver_pace_max[i], app_deliver_pace_eff[i], trans_receive_pace_max[i], trans_receive_pace_eff[i], send_peer_btl_pace[i]);
fprintf(out_desc, "%u, %lli, %lli, %lli, %lli, %lli, %lli, %lli, %lli, %lli\n",
i,
channelRTTs[i],
applicationRTTs[i],
app_deliver_pace_internal[i],
app_deliver_pace_dependent[i],
app_deliver_pace_external[i],
trans_receive_pace_internal[i],
trans_receive_pace_dependent[i],
trans_receive_pace_external[i],
send_peer_btl_pace[i]);
}
if (file_output) {
fclose(out_desc);
}
......@@ -181,10 +193,12 @@ int main(int argc, char **argv) {
_close(s);
free(channelRTTs);
free(applicationRTTs);
free(trans_receive_pace_eff);
free(trans_receive_pace_max);
free(app_deliver_pace_eff);
free(app_deliver_pace_max);
free(app_deliver_pace_internal);
free(app_deliver_pace_dependent);
free(app_deliver_pace_external);
free(trans_receive_pace_internal);
free(trans_receive_pace_dependent);
free(trans_receive_pace_external);
free(send_peer_btl_pace);
pthread_exit(NULL);
......
......@@ -126,10 +126,12 @@ int main(int argc, char **argv) {
char* buf = calloc(buffer_size, sizeof(char));
long long int *sendt = calloc((size_t) rounds, sizeof(long long int));
long long int *ipts = calloc((size_t) rounds, sizeof(long long int));
long long int *app_send_pace_max = calloc((size_t) rounds, sizeof(long long int));
long long int *app_send_pace_eff = calloc((size_t) rounds, sizeof(long long int));
long long int *trans_transmit_pace_max = calloc((size_t) rounds, sizeof(long long int));
long long int *trans_transmit_pace_eff = calloc((size_t) rounds, sizeof(long long int));
long long int *app_send_pace_internal = calloc((size_t) rounds, sizeof(long long int));
long long int *app_send_pace_dependent = calloc((size_t) rounds, sizeof(long long int));
long long int *app_send_pace_external = calloc((size_t) rounds, sizeof(long long int));
long long int *trans_transmit_pace_internal = calloc((size_t) rounds, sizeof(long long int));
long long int *trans_transmit_pace_dependent = calloc((size_t) rounds, sizeof(long long int));
long long int *trans_transmit_pace_external = calloc((size_t) rounds, sizeof(long long int));
long long int *recv_peer_btl_pace = calloc((size_t) rounds, sizeof(long long int));
long long int *nw_pace = calloc((size_t) rounds, sizeof(long long int));
......@@ -142,10 +144,12 @@ int main(int argc, char **argv) {
clock_gettime(CLOCK_REALTIME, &now);
sendt[round] = timedelta(&now, &start);
ipts[round] = timedelta(&now, &prev);
app_send_pace_max[round] = _app_send_pace_max(s);
app_send_pace_eff[round] = _app_send_pace_eff(s);
trans_transmit_pace_max[round] = _trans_transmit_pace_max(s);
trans_transmit_pace_eff[round] = _trans_transmit_pace_eff(s);
app_send_pace_internal[round] = _app_send_pace_internal(s);
app_send_pace_dependent[round] = _app_send_pace_dependent(s);
app_send_pace_external[round] = _app_send_pace_external(s);
trans_transmit_pace_internal[round] = _trans_transmit_pace_internal(s);
trans_transmit_pace_dependent[round] = _trans_transmit_pace_dependent(s);
trans_transmit_pace_external[round] = _trans_transmit_pace_external(s);
recv_peer_btl_pace[round] = _recv_peer_btl_pace(s);
nw_pace[round] = _nw_pace(s);
sprintf(buf, "%10d", round);
......@@ -162,8 +166,15 @@ int main(int argc, char **argv) {
int i;
for (i = 1; i < rounds; i++) {
fprintf(out_desc, "%u, %lli, %lli, %lli, %lli, %lli, %lli, %lli, %lli\n",
i, sendt[i], ipts[i], app_send_pace_max[i], app_send_pace_eff[i], trans_transmit_pace_max[i], trans_transmit_pace_eff[i], recv_peer_btl_pace[i], nw_pace[i]);
fprintf(out_desc, "%u, %lli, %lli, %lli, %lli, %lli, %lli, %lli, %lli, %lli, %lli\n",
i, sendt[i], ipts[i],
app_send_pace_internal[i],
app_send_pace_dependent[i],
app_send_pace_external[i],
trans_transmit_pace_internal[i],
trans_transmit_pace_dependent[i],
trans_transmit_pace_external[i],
recv_peer_btl_pace[i], nw_pace[i]);
}
if (file_output) {
......@@ -174,10 +185,12 @@ int main(int argc, char **argv) {
_close(s);
free(ipts);
free(sendt);
free(app_send_pace_eff);
free(app_send_pace_max);
free(trans_transmit_pace_eff);
free(trans_transmit_pace_max);
free(app_send_pace_dependent);
free(app_send_pace_internal);
free(app_send_pace_external);
free(trans_transmit_pace_dependent);
free(trans_transmit_pace_internal);
free(trans_transmit_pace_external);
free(recv_peer_btl_pace);
free(nw_pace);
free(buf);
......
......@@ -20,7 +20,7 @@
#define DEBUG_DATATRANSMITTER 0
#define DEBUG_HARDSTAMPING 0
#define DEBUG_FEEDBACK 0
#define DEBUG_TIMERECEIVER 0
#define DEBUG_TIMERECEIVER 1
#ifdef DEBUG
#define debug(DOMAIN, M, ...) do { if (DEBUG_ALL||(DOMAIN)) fprintf(stderr, "DEBUG %-20s %s:%d: " M "\n", #DOMAIN + 6, __FILE__, __LINE__, ##__VA_ARGS__); } while (0)
......
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