# HG changeset patch # User kazz # Date 1328731345 -32400 # Node ID 84cfcc8e1bce2cfcbdf882a7d8c312c531cb492c # Parent a76e603c43a010d16eee01262cf7a0301ab23759 change stdout of ring from all time to average time of around time diff -r a76e603c43a0 -r 84cfcc8e1bce scripts/ring_run.sh --- a/scripts/ring_run.sh Thu Feb 09 04:44:22 2012 +0900 +++ b/scripts/ring_run.sh Thu Feb 09 05:02:25 2012 +0900 @@ -14,7 +14,7 @@ cnt=0 while [ $cnt -lt $max ] do - java -cp ../Alice.jar alice.test.topology.ring.RingTopology -host `hostname` -port 10000 -p `expr 20000 + $cnt` -log ./output/ring${cnt}.log -level info -count $count & + java -cp ../Alice.jar alice.test.topology.ring.RingTopology -host `hostname` -port 10000 -p `expr 20000 + $cnt` -log ./output/ring${cnt}.log -level info -count $count -size 4096 & cnt=`expr $cnt + 1` done wait diff -r a76e603c43a0 -r 84cfcc8e1bce src/alice/test/topology/ring/FirstRingMessagePassing.java --- a/src/alice/test/topology/ring/FirstRingMessagePassing.java Thu Feb 09 04:44:22 2012 +0900 +++ b/src/alice/test/topology/ring/FirstRingMessagePassing.java Thu Feb 09 05:02:25 2012 +0900 @@ -20,11 +20,11 @@ @Override public void run() { ods.put("right", "counter", counter.val); - if (counter.index >= count) { + if (counter.index > count) { ods.put("right", "finish", ValueFactory.createNilValue()); long endTime = System.nanoTime(); long time = endTime - startTime; - System.out.println(count + ", " + time); + System.out.println(count + ", " + time / count); return; }