changeset 61:84cfcc8e1bce

change stdout of ring from all time to average time of around time
author kazz <kazz@cr.ie.u-ryukyu.ac.jp>
date Thu, 09 Feb 2012 05:02:25 +0900
parents a76e603c43a0
children ead04b496305
files scripts/ring_run.sh src/alice/test/topology/ring/FirstRingMessagePassing.java
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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;	
 		}