From 3b65bc9b018d0cfebfd0d6c89c18be975940e746 Mon Sep 17 00:00:00 2001 From: Par Winzell Date: Thu, 29 Jan 2009 16:38:52 +0000 Subject: [PATCH] The 50 ms warning triggers every couple of thousand stores for a relatively large cache, usually with times in the 60-70 ms range which is certainly acceptable as long as they're that rare. Let's bump it to 100 ms since we're still on guard for gremlins. --- src/java/com/samskivert/depot/EHCacheAdapter.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/java/com/samskivert/depot/EHCacheAdapter.java b/src/java/com/samskivert/depot/EHCacheAdapter.java index f81f905..b69032b 100644 --- a/src/java/com/samskivert/depot/EHCacheAdapter.java +++ b/src/java/com/samskivert/depot/EHCacheAdapter.java @@ -22,7 +22,6 @@ package com.samskivert.depot; import java.io.Serializable; import java.util.Collections; -import java.util.HashSet; import java.util.Map; import java.util.Set; @@ -77,8 +76,8 @@ public class EHCacheAdapter } CachedValue result = lookup(bin.getCache(), cacheId, key); long dT = System.currentTimeMillis() - now; - if (dT > 50) { - log.warning("Aii! A simple ehcache lookup took over 50 ms!", "cacheId", cacheId, + if (dT > 100) { + log.warning("Aii! A simple ehcache lookup took over 100 ms!", "cacheId", cacheId, "key", key, "dT", dT, "lookups", _lookups); } _lookups ++; @@ -101,8 +100,8 @@ public class EHCacheAdapter } bin.getCache().put(new Element(new EHCacheKey(cacheId, key), value != null ? value : NULL)); long dT = System.currentTimeMillis() - now; - if (dT > 50) { - log.warning("Aii! A simple ehcache store took over 50 ms!", "cacheId", cacheId, + if (dT > 100) { + log.warning("Aii! A simple ehcache store took over 100 ms!", "cacheId", cacheId, "key", key, "dT", dT, "stores", _stores); } _stores ++; @@ -117,8 +116,8 @@ public class EHCacheAdapter bin.getCache().remove(new EHCacheKey(cacheId, key)); } long dT = System.currentTimeMillis() - now; - if (dT > 50) { - log.warning("Aii! A simple ehcache remove took over 50 ms!", "cacheId", cacheId, + if (dT > 100) { + log.warning("Aii! A simple ehcache remove took over 100 ms!", "cacheId", cacheId, "key", key, "dT", dT, "removes", _removes); } _removes ++;