[jbosscache-commits] JBoss Cache SVN: r4985 - cache-bench-fwk/trunk/src/org/cachebench/smartfrog.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Fri Jan 4 11:20:23 EST 2008


Author: mircea.markus
Date: 2008-01-04 11:20:23 -0500 (Fri, 04 Jan 2008)
New Revision: 4985

Modified:
   cache-bench-fwk/trunk/src/org/cachebench/smartfrog/CacheBenchmarkPrim.java
Log:
the Prim was enhanced to log the output of the run script

Modified: cache-bench-fwk/trunk/src/org/cachebench/smartfrog/CacheBenchmarkPrim.java
===================================================================
--- cache-bench-fwk/trunk/src/org/cachebench/smartfrog/CacheBenchmarkPrim.java	2008-01-04 15:57:04 UTC (rev 4984)
+++ cache-bench-fwk/trunk/src/org/cachebench/smartfrog/CacheBenchmarkPrim.java	2008-01-04 16:20:23 UTC (rev 4985)
@@ -7,7 +7,10 @@
 import org.smartfrog.sfcore.prim.PrimImpl;
 import org.smartfrog.sfcore.prim.TerminationRecord;
 
+import java.io.BufferedReader;
 import java.io.File;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
 import java.rmi.RemoteException;
 
 /**
@@ -56,6 +59,13 @@
          String command = scriptToExec + " " + nodeIndex + " " + cacheDistribution + " -DclusterSize=" + clusterSize;
          log.info("Executing command: " + command);
          Process process = Runtime.getRuntime().exec(command, null, toRunIn);
+         InputStreamReader reader = new InputStreamReader(process.getInputStream());
+         BufferedReader bufferedReader = new LineNumberReader(reader);
+         String line;
+         while ((line = bufferedReader.readLine()) != null)
+         {
+            log.debug(scriptToExec + ">>>" + line);
+         }
          int exitValue = process.waitFor();
          if (exitValue != 0)
          {




More information about the jbosscache-commits mailing list