From aff2b3b06a6ecdb9b01e2e79e1e5a8b3b334fbf6 Mon Sep 17 00:00:00 2001 From: "Frederick F. Kautz IV" Date: Wed, 29 Apr 2015 21:13:32 -0700 Subject: [PATCH] Adding debug statements for testing --- pkg/storage/drivers/memory/memory.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/storage/drivers/memory/memory.go b/pkg/storage/drivers/memory/memory.go index 2a10556b9..4858c708a 100644 --- a/pkg/storage/drivers/memory/memory.go +++ b/pkg/storage/drivers/memory/memory.go @@ -309,6 +309,7 @@ func (memory *memoryDriver) CreateObject(bucket, key, contentType, expectedMD5Su if memory.totalSize > memory.maxSize { memory.objects.RemoveOldest() } + log.Println("Size:", memory.totalSize) memory.lock.Unlock() return nil } @@ -492,7 +493,8 @@ func (memory *memoryDriver) GetObjectMetadata(bucket, key, prefix string) (drive func (memory *memoryDriver) evictObject(key lru.Key, value interface{}) { k := key.(string) memory.totalSize = memory.totalSize - uint64(memory.objectMetadata[k].metadata.Size) - log.Println("evicting:", k) + log.Println("evicting:", k, memory.objectMetadata[k].metadata.Size) + log.Println("Size:", memory.totalSize) delete(memory.objectMetadata, k) }