Commit 949dd905 authored by Wojciech Tyczynski's avatar Wojciech Tyczynski

Extend logging for performance debuggin

parent 630d7ab6
...@@ -645,6 +645,7 @@ func (c *cacheWatcher) add(event *watchCacheEvent) { ...@@ -645,6 +645,7 @@ func (c *cacheWatcher) add(event *watchCacheEvent) {
default: default:
} }
resultLen := len(c.result)
// OK, block sending, but only for up to 5 seconds. // OK, block sending, but only for up to 5 seconds.
// cacheWatcher.add is called very often, so arrange // cacheWatcher.add is called very often, so arrange
// to reuse timers instead of constantly allocating. // to reuse timers instead of constantly allocating.
...@@ -673,8 +674,8 @@ func (c *cacheWatcher) add(event *watchCacheEvent) { ...@@ -673,8 +674,8 @@ func (c *cacheWatcher) add(event *watchCacheEvent) {
c.forget(false) c.forget(false)
c.stop() c.stop()
} }
glog.V(2).Infof("cacheWatcher add function blocked processing of %v for %v", 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)) reflect.TypeOf(event.Object).String(), time.Since(startTime), resultLen)
} }
func (c *cacheWatcher) sendWatchCacheEvent(event watchCacheEvent) { func (c *cacheWatcher) sendWatchCacheEvent(event watchCacheEvent) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment