mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
start tests with sequence 0 and use sequence number for average calculation
git-svn-id: https://zerberus.eonerc.rwth-aachen.de:8443/svn/s2ss/trunk@248 8ec27952-4edc-4aab-86aa-e87bb2611832
This commit is contained in:
parent
4c7386a90d
commit
578a7925e5
1 changed files with 2 additions and 4 deletions
|
@ -79,7 +79,6 @@ int main(int argc, char *argv[])
|
|||
double rtt_max = LLONG_MIN;
|
||||
double rtt_min = LLONG_MAX;
|
||||
double avg = 0;
|
||||
int run = 0;
|
||||
int bar;
|
||||
unsigned hist[RTT_HIST];
|
||||
|
||||
|
@ -92,8 +91,6 @@ int main(int argc, char *argv[])
|
|||
fprintf(stdout, "%5s%10s%10s%10s%10s\n", "seq", "rtt", "min", "max", "avg");
|
||||
|
||||
while (running) {
|
||||
m.sequence++;
|
||||
run++;
|
||||
|
||||
clock_gettime(CLOCK_ID, ts1);
|
||||
msg_send(&m, &n);
|
||||
|
@ -118,9 +115,10 @@ int main(int argc, char *argv[])
|
|||
clock_gettime(CLOCK_REALTIME, &ts);
|
||||
fprintf(stdout, "%17.6f", ts.tv_sec + ts.tv_nsec / 1e9);
|
||||
#endif
|
||||
m.sequence++;
|
||||
|
||||
fprintf(stdout, "%5u%10.3f%10.3f%10.3f%10.3f\n", m.sequence,
|
||||
1e3 * rtt, 1e3 * rtt_min, 1e3 * rtt_max, 1e3 * avg / run);
|
||||
1e3 * rtt, 1e3 * rtt_min, 1e3 * rtt_max, 1e3 * avg / m.sequence);
|
||||
}
|
||||
|
||||
free(ts2);
|
||||
|
|
Loading…
Add table
Reference in a new issue