From 949dd905935b262faaa5dc349ae9d80fff533333 Mon Sep 17 00:00:00 2001 From: Wojciech Tyczynski Date: Mon, 12 Sep 2016 12:46:19 +0200 Subject: [PATCH] Extend logging for performance debuggin --- pkg/storage/cacher.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/storage/cacher.go b/pkg/storage/cacher.go index 7904cce70ca..4520262ada6 100644 --- a/pkg/storage/cacher.go +++ b/pkg/storage/cacher.go @@ -645,6 +645,7 @@ func (c *cacheWatcher) add(event *watchCacheEvent) { default: } + resultLen := len(c.result) // OK, block sending, but only for up to 5 seconds. // cacheWatcher.add is called very often, so arrange // to reuse timers instead of constantly allocating. @@ -673,8 +674,8 @@ func (c *cacheWatcher) add(event *watchCacheEvent) { c.forget(false) c.stop() } - glog.V(2).Infof("cacheWatcher add function blocked processing of %v for %v", - reflect.TypeOf(event.Object).String(), time.Since(startTime)) + glog.V(2).Infof("cacheWatcher add function blocked processing of %v for %v (initial result size %v)", + reflect.TypeOf(event.Object).String(), time.Since(startTime), resultLen) } func (c *cacheWatcher) sendWatchCacheEvent(event watchCacheEvent) {