Here are the examples of the java api class com.google.android.exoplayer.playbacktests.util.MetricsLogger taken from open source projects.
1. DashTest#testDashPlayback()
Project: ExoPlayer
File: DashTest.java
File: DashTest.java
private void testDashPlayback(HostActivity activity, String streamName, ActionSchedule actionSchedule, boolean fullPlaybackNoSeeking, String manifestFileName, String audioFormat, boolean canIncludeAdditionalVideoFormats, String... videoFormats) throws IOException { MediaPresentationDescription mpd = TestUtil.loadManifest(activity, TAG, MANIFEST_URL_PREFIX + manifestFileName, new MediaPresentationDescriptionParser()); MetricsLogger metricsLogger = MetricsLogger.Factory.createDefault(getInstrumentation(), TAG, REPORT_NAME, streamName); DashHostedTest test = new DashHostedTest(streamName, mpd, metricsLogger, fullPlaybackNoSeeking, audioFormat, canIncludeAdditionalVideoFormats, false, actionSchedule, videoFormats); activity.runTest(test, mpd.duration + MAX_ADDITIONAL_TIME_MS); // non-CDD required formats (b/28220076). if (test.needsCddLimitedRetry) { metricsLogger = MetricsLogger.Factory.createDefault(getInstrumentation(), TAG, REPORT_NAME, streamName + "_cdd_limited_retry"); test = new DashHostedTest(streamName, mpd, metricsLogger, fullPlaybackNoSeeking, audioFormat, false, true, actionSchedule, videoFormats); activity.runTest(test, mpd.duration + MAX_ADDITIONAL_TIME_MS); } }