Commit a2371171 authored by Andreas Schmidt's avatar Andreas Schmidt

Add both to CSV.

parent bf36d136
Pipeline #2082 failed with stages
in 22 seconds
...@@ -100,6 +100,7 @@ int main(int argc, char **argv) { ...@@ -100,6 +100,7 @@ int main(int argc, char **argv) {
#endif #endif
long long int *rtts = calloc((size_t) rounds, sizeof(long long int)); long long int *rtts = calloc((size_t) rounds, sizeof(long long int));
long long int *rtts2 = calloc((size_t) rounds, sizeof(long long int));
s = PrrtSocket_create(false, HALF_TIMESTAMP-1); s = PrrtSocket_create(false, HALF_TIMESTAMP-1);
check(s != NULL, "Could not create socket."); check(s != NULL, "Could not create socket.");
...@@ -126,18 +127,21 @@ int main(int argc, char **argv) { ...@@ -126,18 +127,21 @@ int main(int argc, char **argv) {
continue; continue;
} }
int round = 0; int round = 0;
struct timespec now;
struct timespec * old; struct timespec * old;
struct timespec * channel; struct timespec * channel;
clock_gettime(CLOCK_REALTIME, &now);
sscanf(buffer, "%10d", &round); sscanf(buffer, "%10d", &round);
old = (struct timespec *) (buffer + 20); old = (struct timespec *) (buffer + 20);
channel = (struct timespec *) (buffer + n - sizeof(struct timespec)); channel = (struct timespec *) (buffer + n - sizeof(struct timespec));
rtts[round] = timedelta(channel, old); rtts[round] = timedelta(channel, old);
rtts2[round] = timedelta(&now, old);
i++; i++;
} }
for (i = 0; i < rounds; i++) { for (i = 0; i < rounds; i++) {
fprintf(out_desc, "%u, %lli\n", i, rtts[i]); fprintf(out_desc, "%u, %lli, %lli\n", i, rtts[i], rtts2[i]);
} }
...@@ -150,6 +154,8 @@ int main(int argc, char **argv) { ...@@ -150,6 +154,8 @@ int main(int argc, char **argv) {
} }
PrrtSocket_close(s); PrrtSocket_close(s);
free(rtts);
free(rtts2);
free(s); free(s);
free(tstable_data); free(tstable_data);
free(tstable_redundancy); free(tstable_redundancy);
......
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