logd: Add minimum time bucket statistics

* Only enabled for dev builds because halves performance.
- Used to establish if /proc/sys/net/unix/max_dgram_qlen
  is appropriate for the platform
  (see logd/LogStatistics.cpp comments)
- enabled if logd.dgram_qlen.statistics is not zero/empty

Change-Id: Ib8ecfeb75b6f0f954c099a6b1032b8afb5efcbd4
diff --git a/logd/LogBuffer.h b/logd/LogBuffer.h
index cbbb2ce..c3460ca 100644
--- a/logd/LogBuffer.h
+++ b/logd/LogBuffer.h
@@ -36,6 +36,8 @@
 
     LogStatistics stats;
 
+    bool dgram_qlen_statistics;
+
 #ifdef USERDEBUG_BUILD
     PruneList mPrune;
 
@@ -64,6 +66,11 @@
     // *strp uses malloc, use free to release.
     void formatStatistics(char **strp, uid_t uid, unsigned int logMask);
 
+    void enableDgramQlenStatistics() {
+        stats.enableDgramQlenStatistics();
+        dgram_qlen_statistics = true;
+    }
+
 #ifdef USERDEBUG_BUILD
     int initPrune(char *cp) { return mPrune.init(cp); }
     // *strp uses malloc, use free to release.