Add directive to make webrtc metrics optional.
Bug: webrtc:11144 Change-Id: I4e75e6aec033784685de3670e880bb9f2b6ee8d2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161043 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Ying Wang <yinwa@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30040}
This commit is contained in:
@ -44,7 +44,6 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.webrtc.Logging;
|
||||
import org.webrtc.Metrics.HistogramInfo;
|
||||
import org.webrtc.PeerConnection.IceConnectionState;
|
||||
import org.webrtc.PeerConnection.IceGatheringState;
|
||||
import org.webrtc.PeerConnection.PeerConnectionState;
|
||||
@ -1157,7 +1156,6 @@ public class PeerConnectionTest {
|
||||
offeringPC = null;
|
||||
shutdownPC(answeringPC, answeringExpectations);
|
||||
answeringPC = null;
|
||||
getMetrics();
|
||||
videoCapturer.stopCapture();
|
||||
videoCapturer.dispose();
|
||||
videoSource.dispose();
|
||||
@ -1872,16 +1870,6 @@ public class PeerConnectionTest {
|
||||
assertNull(sdpLatch.getSdp());
|
||||
}
|
||||
|
||||
private static void getMetrics() {
|
||||
Metrics metrics = Metrics.getAndReset();
|
||||
assertTrue(metrics.map.size() > 0);
|
||||
// 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);
|
||||
assertTrue(info.samples.size() > 0);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // TODO(sakal): getStats is deprecated
|
||||
private static void shutdownPC(PeerConnection pc, ObserverExpectations expectations) {
|
||||
if (expectations.dataChannel != null) {
|
||||
|
||||
Reference in New Issue
Block a user