Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Unified Diff: webrtc/video/call_stats_unittest.cc

Issue 1915523002: Add a default implementation in metrics_default.cc of histograms methods in system_wrappers/interfac (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/test/test_suite.cc ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/call_stats_unittest.cc
diff --git a/webrtc/video/call_stats_unittest.cc b/webrtc/video/call_stats_unittest.cc
index 8b3cde07a8e47c07feb703fb3f3d3974f5e03060..f81a3a3eff6923dcab869a4bd8e8e02d3122d8dc 100644
--- a/webrtc/video/call_stats_unittest.cc
+++ b/webrtc/video/call_stats_unittest.cc
@@ -15,7 +15,7 @@
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "webrtc/system_wrappers/include/metrics.h"
-#include "webrtc/test/histogram.h"
+#include "webrtc/system_wrappers/include/metrics_default.h"
#include "webrtc/video/call_stats.h"
using ::testing::_;
@@ -204,6 +204,7 @@ TEST_F(CallStatsTest, LastProcessedRtt) {
}
TEST_F(CallStatsTest, ProducesHistogramMetrics) {
+ metrics::Reset();
const int64_t kRtt = 123;
RtcpRttStats* rtcp_rtt_stats = call_stats_->rtcp_rtt_stats();
rtcp_rtt_stats->OnRttUpdate(kRtt);
@@ -212,10 +213,10 @@ TEST_F(CallStatsTest, ProducesHistogramMetrics) {
call_stats_->Process();
call_stats_.reset();
- EXPECT_EQ(1, test::NumHistogramSamples(
+ EXPECT_EQ(1, metrics::NumSamples(
"WebRTC.Video.AverageRoundTripTimeInMilliseconds"));
- EXPECT_EQ(kRtt, test::LastHistogramSample(
- "WebRTC.Video.AverageRoundTripTimeInMilliseconds"));
+ EXPECT_EQ(1, metrics::NumEvents(
+ "WebRTC.Video.AverageRoundTripTimeInMilliseconds", kRtt));
}
} // namespace webrtc
« no previous file with comments | « webrtc/test/test_suite.cc ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698