Author: mircea.markus
Date: 2008-01-10 06:28:01 -0500 (Thu, 10 Jan 2008)
New Revision: 5108
Modified:
benchmarks/benchmark-fwk/trunk/src/org/cachebench/warmup/CacheWarmup.java
benchmarks/benchmark-fwk/trunk/src/org/cachebench/warmup/PutGetCacheWarmup.java
Log:
warmup does not throw any exception now
Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/warmup/CacheWarmup.java
===================================================================
--- benchmarks/benchmark-fwk/trunk/src/org/cachebench/warmup/CacheWarmup.java 2008-01-09
22:24:49 UTC (rev 5107)
+++ benchmarks/benchmark-fwk/trunk/src/org/cachebench/warmup/CacheWarmup.java 2008-01-10
11:28:01 UTC (rev 5108)
@@ -33,12 +33,24 @@
/**
* Calls {@link #performWarmupOperations(CacheWrapper)} amd clears the cache.
*/
- public final void warmup(CacheWrapper cacheWrapper) throws Exception
+ public final void warmup(CacheWrapper cacheWrapper)
{
long startTime = System.currentTimeMillis();
- performWarmupOperations(cacheWrapper);
+ try
+ {
+ performWarmupOperations(cacheWrapper);
+ } catch (Exception e)
+ {
+ log.warn("Received exception durring cache warmup");
+ }
log.info("The warmup took: " + ((System.currentTimeMillis() - startTime)
/ 1000) + " seconds." );
- cacheWrapper.empty();
+ try
+ {
+ cacheWrapper.empty();
+ } catch (Exception e)
+ {
+ log.warn("Received exception durring cache warmup");
+ }
}
public abstract void performWarmupOperations(CacheWrapper wrapper) throws Exception;
Modified: benchmarks/benchmark-fwk/trunk/src/org/cachebench/warmup/PutGetCacheWarmup.java
===================================================================
---
benchmarks/benchmark-fwk/trunk/src/org/cachebench/warmup/PutGetCacheWarmup.java 2008-01-09
22:24:49 UTC (rev 5107)
+++
benchmarks/benchmark-fwk/trunk/src/org/cachebench/warmup/PutGetCacheWarmup.java 2008-01-10
11:28:01 UTC (rev 5108)
@@ -20,7 +20,13 @@
log.info("Cache launched, performing " + opCount + " put and get
operations ");
for (int i = 0; i < opCount; i++)
{
- wrapper.put(String.valueOf(opCount), String.valueOf(opCount));
+ try
+ {
+ wrapper.put(String.valueOf(opCount), String.valueOf(opCount));
+ } catch (Exception e)
+ {
+ log.warn("Exception on cache warmup:", e);
+ }
}
for (int i = 0; i < opCount; i++)
Show replies by date