Add stats for video:
- number of sent/received RTCP NACK/FIR/PLI per minute
- percentage of unique sent/received NACK requests
- percentage of discarded/duplicated packets by the jitter buffer
- permille of sent/received key frames

BUG=crbug/419657
R=mflodman@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/24959004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7592 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/system_wrappers/interface/metrics.h b/webrtc/system_wrappers/interface/metrics.h
index be9564a..0390140 100644
--- a/webrtc/system_wrappers/interface/metrics.h
+++ b/webrtc/system_wrappers/interface/metrics.h
@@ -69,12 +69,26 @@
 // Also consider changing string to const char* when switching to atomics.
 
 // Histogram for counters.
+#define RTC_HISTOGRAM_COUNTS_100(name, sample) RTC_HISTOGRAM_COUNTS( \
+    name, sample, 1, 100, 50)
+
+#define RTC_HISTOGRAM_COUNTS_1000(name, sample) RTC_HISTOGRAM_COUNTS( \
+    name, sample, 1, 1000, 50)
+
+#define RTC_HISTOGRAM_COUNTS_10000(name, sample) RTC_HISTOGRAM_COUNTS( \
+    name, sample, 1, 10000, 50)
+
 #define RTC_HISTOGRAM_COUNTS(name, sample, min, max, bucket_count) \
     RTC_HISTOGRAM_COMMON_BLOCK(name, sample, \
         webrtc::metrics::HistogramFactoryGetCounts( \
             name, min, max, bucket_count))
 
+// Histogram for percentage.
+#define RTC_HISTOGRAM_PERCENTAGE(name, sample) \
+    RTC_HISTOGRAM_ENUMERATION(name, sample, 101)
+
 // Histogram for enumerators.
+// |boundary| should be above the max enumerator sample.
 #define RTC_HISTOGRAM_ENUMERATION(name, sample, boundary) \
     RTC_HISTOGRAM_COMMON_BLOCK(name, sample, \
         webrtc::metrics::HistogramFactoryGetEnumeration(name, boundary))