webrtc/system_wrappers
Steve Anton c1e6e8672a Add metrics::Samples to facilitate easier testing
Currently, tests that verify metrics use a combination of
metrics::NumSamples and metrics::NumEvents to assert which samples
were recorded and how many times they were recorded. This means
that a comprehensive tests has n + 1 assertions for n distinct
samples.

The new metrics::Samples function returns a map of sample --> num
events which can be asserted against using gmock matchers,
achieving better coverage and better test failure messages in just
one line.

Bug: None
Change-Id: I07d4a766654cfc04e414b77b6de02927683a361f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125486
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26974}
2019-03-05 17:51:14 +00:00
..
include Add metrics::Samples to facilitate easier testing 2019-03-05 17:51:14 +00:00
source Add metrics::Samples to facilitate easier testing 2019-03-05 17:51:14 +00:00
BUILD.gn Remove definition of macro WEBRTC_THREAD_RR (it's unused). 2019-01-14 15:01:38 +00:00
DEPS Moving src/webrtc into src/. 2017-09-15 04:25:06 +00:00
OWNERS Relieve perkj@ of some OWNER duties 2018-10-18 09:41:22 +00:00