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

Unified Diff: webrtc/api/androidtests/src/org/webrtc/PeerConnectionTest.java

Issue 2136533002: Only update codec type histogram if lifetime is long enough (10 sec). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 5 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 | « no previous file | webrtc/call/call.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/androidtests/src/org/webrtc/PeerConnectionTest.java
diff --git a/webrtc/api/androidtests/src/org/webrtc/PeerConnectionTest.java b/webrtc/api/androidtests/src/org/webrtc/PeerConnectionTest.java
index 14ca30b23f2f53a953001ea8a7ea930d93e9fa3c..510c8951bd05934dd1d9c0d0e594d7c6cd1f503c 100644
--- a/webrtc/api/androidtests/src/org/webrtc/PeerConnectionTest.java
+++ b/webrtc/api/androidtests/src/org/webrtc/PeerConnectionTest.java
@@ -744,13 +744,13 @@ public class PeerConnectionTest extends ActivityTestCase {
answeringExpectations.expectStateChange(DataChannel.State.CLOSED);
answeringExpectations.dataChannel.close();
offeringExpectations.dataChannel.close();
- getMetrics();
// Free the Java-land objects and collect them.
shutdownPC(offeringPC, offeringExpectations);
offeringPC = null;
shutdownPC(answeringPC, answeringExpectations);
answeringPC = null;
+ getMetrics();
videoSource.dispose();
factory.dispose();
System.gc();
@@ -1026,13 +1026,11 @@ public class PeerConnectionTest extends ActivityTestCase {
private static void getMetrics() {
Metrics metrics = Metrics.getAndReset();
assertTrue(metrics.map.size() > 0);
- // Test for example that the configured video codec is recorded when a
- // VideoSendStream is created.
- String name = "WebRTC.Video.Encoder.CodecType";
+ // Test for example that the lifetime of a Call is recorded.
+ String name = "WebRTC.Call.LifetimeInSeconds";
assertTrue(metrics.map.containsKey(name));
HistogramInfo info = metrics.map.get(name);
- assertEquals(1, info.samples.size()); // samples: <sample value, # of events>
- assertTrue(info.samples.containsValue(2)); // <codec type, 2>, same codec configured
+ assertTrue(info.samples.size() > 0);
}
private static void shutdownPC(
« no previous file with comments | « no previous file | webrtc/call/call.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698