Remove CACHE_STATISTICS preprocessor macro, assuming it's always 1.

It was added in 2012 and we decided that it's not required anymore.
This commit is contained in:
Egor Suvorov
2016-08-11 18:49:43 -04:00
parent 54b2f9fa85
commit 40d9ea8f09
3 changed files with 0 additions and 15 deletions
-4
View File
@@ -131,13 +131,9 @@ SystemCachePath::SystemCachePath(const StringPiece& path,
ThreadsafeCache* ts_cache =
new ThreadsafeCache(lru_cache, factory->thread_system()->NewMutex());
factory->TakeOwnership(ts_cache);
#if CACHE_STATISTICS
lru_cache_ = new CacheStats(kLruCache, ts_cache, factory->timer(),
factory->statistics());
factory->TakeOwnership(lru_cache_);
#else
lru_cache_ = ts_cache;
#endif
}
}
-5
View File
@@ -151,11 +151,6 @@ class SystemCachePath {
ServerContextSet server_context_set_ GUARDED_BY(mutex_);
};
// CACHE_STATISTICS is #ifdef'd to facilitate experiments with whether
// tracking the detailed stats & histograms has a QPS impact. Set it
// to 0 to turn it off.
#define CACHE_STATISTICS 1
} // namespace net_instaweb
#endif // PAGESPEED_SYSTEM_SYSTEM_CACHE_PATH_H_
-6
View File
@@ -186,13 +186,11 @@ SystemCaches::MemcachedInterfaces SystemCaches::GetMemcached(
// Put the batcher above the stats so that the stats sees the MultiGets
// and can show us the histogram of how they are sized.
#if CACHE_STATISTICS
memcached.async = new CacheStats(kMemcachedAsync,
memcached.async,
factory_->timer(),
factory_->statistics());
factory_->TakeOwnership(memcached.async);
#endif
CacheBatcher* batcher = new CacheBatcher(
memcached.async, factory_->thread_system()->NewMutex(),
@@ -205,14 +203,10 @@ SystemCaches::MemcachedInterfaces SystemCaches::GetMemcached(
// Populate the blocking memcached interface, giving it its own
// statistics wrapper.
#if CACHE_STATISTICS
memcached.blocking = new CacheStats(kMemcachedBlocking, mem_cache,
factory_->timer(),
factory_->statistics());
factory_->TakeOwnership(memcached.blocking);
#else
memcached.blocking = mem_cache;
#endif
}
return memcached;
}