extra output to determine reason for slow test runs

This commit is contained in:
gojomo
2011-06-08 23:56:35 +00:00
parent 71ca9262df
commit 19390f270a
2 changed files with 11 additions and 2 deletions
@@ -323,7 +323,7 @@ implements ObjectIdentityCache<V>, Closeable, Serializable {
}
}
private String composeCacheSummary() {
String composeCacheSummary() {
long totalHits = cacheHit.get() + diskHit.get();
if (totalHits < 1) {
return "";
@@ -96,6 +96,8 @@ implements ObjectIdentityCache<V>, Closeable, Serializable, MapEvictionListener<
private AtomicLong supplierUsed = new AtomicLong(0);
/** count of {@link #sync()} use */
transient private AtomicLong useStatsSyncUsed = new AtomicLong(0);
/** Count of times Supplier was used for new object */
private AtomicLong evictions = new AtomicLong(0);
/**
* Constructor. You must call
@@ -262,7 +264,7 @@ implements ObjectIdentityCache<V>, Closeable, Serializable, MapEvictionListener<
}
}
private String composeCacheSummary() {
String composeCacheSummary() {
long totalHits = cacheHit.get() + diskHit.get();
if (totalHits < 1) {
return "";
@@ -283,6 +285,12 @@ implements ObjectIdentityCache<V>, Closeable, Serializable, MapEvictionListener<
.append(diskHit.get())
.append(" supplieds=")
.append(supplierUsed.get())
.append(" inMemItems=")
.append(memMap.size())
.append(" dirtyItems=")
.append(dirtyItems.size())
.append(" evictions=")
.append(evictions.get())
.append(" syncs=")
.append(useStatsSyncUsed.get());
return sb.toString();
@@ -358,6 +366,7 @@ implements ObjectIdentityCache<V>, Closeable, Serializable, MapEvictionListener<
@Override
public void onEviction(String key, V val) {
evictions.incrementAndGet();
diskMap.put(key, val);
}
}