From: <joh...@us...> - 2014-07-08 15:06:12
|
Revision: 18165 http://sourceforge.net/p/gate/code/18165 Author: johann_p Date: 2014-07-08 15:06:08 +0000 (Tue, 08 Jul 2014) Log Message: ----------- Add some information about loading and processing time to the log Modified Paths: -------------- gcp/trunk/src/gate/cloud/batch/BatchRunner.java Modified: gcp/trunk/src/gate/cloud/batch/BatchRunner.java =================================================================== --- gcp/trunk/src/gate/cloud/batch/BatchRunner.java 2014-07-07 18:57:06 UTC (rev 18164) +++ gcp/trunk/src/gate/cloud/batch/BatchRunner.java 2014-07-08 15:06:08 UTC (rev 18165) @@ -407,6 +407,10 @@ return; } } + long processingFinishedTime = System.currentTimeMillis(); + log.info("Processing time (seconds): "+(processingFinishedTime-loadingFinishedTime)/1000.0); + log.info("Total time (seconds): "+(processingFinishedTime-startTime)/1000.0); + } /** @@ -506,6 +510,9 @@ public Set<String> getBatchJobIDs() { return new HashSet<String>(runningJobs.keySet()); } + + static long startTime = System.currentTimeMillis(); + static long loadingFinishedTime; /** * Main entry point. This can be invoked in one of two ways: the "legacy" @@ -525,7 +532,6 @@ // The GCP-CLI way to invoke is "nthreads configfile" with no // option flags while the command line invokation always includes // requried option flags. - // Options for the command line invokation // TODO: may be useful to be able to override the default user config and // session files here? @@ -779,7 +785,10 @@ } log.info("Total allocated memory: "+(runtime.totalMemory()/MB)+"M"); log.info("Used memory: "+((runtime.totalMemory()-runtime.freeMemory())/MB)+"M"); + loadingFinishedTime = System.currentTimeMillis(); + log.info("Loading time (seconds): "+(loadingFinishedTime-startTime)/1000.0); log.info("Launching batch:\n" + aBatch); + instance.runBatch(aBatch); instance.shutdownWhenFinished(true); instance.exitWhenFinished(true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |