mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-19 03:05:14 +00:00
Merge pull request #330 from adamdunkels/push/faster-collect-lossy
Faster collect-lossy travis test
This commit is contained in:
commit
fe0a0423cb
@ -398,6 +398,7 @@ booted = new Array();
|
||||
received = new Array();
|
||||
hops = new Array();
|
||||
nrNodes = 20;
|
||||
toReceive = 8;
|
||||
total_received = 0;
|
||||
total_lost = 0;
|
||||
total_hops = 0;
|
||||
@ -411,7 +412,10 @@ total_latency = 0;
|
||||
nodes_starting = true;
|
||||
for(i = 1; i <= nrNodes; i++) {
|
||||
booted[i] = false;
|
||||
received[i] = "__________";
|
||||
received[i] = '';
|
||||
for(var j = 0; j < toReceive; j++) {
|
||||
received[i] += '_';
|
||||
}
|
||||
hops[i] = received[i];
|
||||
}
|
||||
|
||||
@ -495,20 +499,20 @@ while(true) {
|
||||
dups++;
|
||||
}
|
||||
received[source] = received[source].substr(0, seqno) + dups +
|
||||
received[source].substr(seqno + 1, 10 - seqno);
|
||||
received[source].substr(seqno + 1, toReceive - seqno);
|
||||
|
||||
if(hop > 9) {
|
||||
hop = "+";
|
||||
}
|
||||
hops[source] = hops[source].substr(0, seqno) + hop +
|
||||
hops[source].substr(seqno + 1, 10 - seqno);
|
||||
hops[source].substr(seqno + 1, toReceive - seqno);
|
||||
|
||||
total_received++;
|
||||
total_hops += hop;
|
||||
|
||||
print_stats();
|
||||
}
|
||||
/* Signal OK if all nodes have reported 10 messages. */
|
||||
/* Signal OK if all nodes have reported toReceive messages. */
|
||||
num_reported = 0;
|
||||
for(i = 1; i <= nrNodes; i++) {
|
||||
if(i != sink) {
|
||||
|
Loading…
Reference in New Issue
Block a user