Remove FrameTimingGfxInfoMetric
Test: None
Legacy metric, which predated getting these numbers from traces. No
longer monitored.
Change-Id: I4bad0e9b1940e80afc59df4b2017a819f990bbc7
diff --git a/benchmark/benchmark-macro/api/restricted_current.ignore b/benchmark/benchmark-macro/api/restricted_current.ignore
new file mode 100644
index 0000000..1baa91d
--- /dev/null
+++ b/benchmark/benchmark-macro/api/restricted_current.ignore
@@ -0,0 +1,3 @@
+// Baseline format: 1.0
+RemovedClass: androidx.benchmark.macro.FrameTimingGfxInfoMetric:
+ Removed class androidx.benchmark.macro.FrameTimingGfxInfoMetric
diff --git a/benchmark/benchmark-macro/api/restricted_current.txt b/benchmark/benchmark-macro/api/restricted_current.txt
index 7b95bc2..9f3161b 100644
--- a/benchmark/benchmark-macro/api/restricted_current.txt
+++ b/benchmark/benchmark-macro/api/restricted_current.txt
@@ -56,10 +56,6 @@
method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public static boolean isSupportedWithVmSettings(androidx.benchmark.macro.CompilationMode);
}
- @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public final class FrameTimingGfxInfoMetric extends androidx.benchmark.macro.Metric {
- ctor public FrameTimingGfxInfoMetric();
- }
-
public final class FrameTimingMetric extends androidx.benchmark.macro.Metric {
ctor public FrameTimingMetric();
}
diff --git a/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/JankCollectionHelper.java b/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/JankCollectionHelper.java
deleted file mode 100644
index d0b11e8..0000000
--- a/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/JankCollectionHelper.java
+++ /dev/null
@@ -1,378 +0,0 @@
-/*
- * Copyright 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package androidx.benchmark.macro;
-
-import android.text.TextUtils;
-import android.util.Log;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.annotation.VisibleForTesting;
-import androidx.test.platform.app.InstrumentationRegistry;
-import androidx.test.uiautomator.UiDevice;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/** Collects jank metrics for all or a list of processes. */
-class JankCollectionHelper {
-
- private static final String LOG_TAG = JankCollectionHelper.class.getSimpleName();
-
- // Prefix for all output metrics that come from the gfxinfo dump.
- @VisibleForTesting static final String GFXINFO_METRICS_PREFIX = "gfxinfo";
- // Shell dump commands to get and reset the tracked gfxinfo metrics.
- @VisibleForTesting static final String GFXINFO_COMMAND_GET = "dumpsys gfxinfo %s";
- @VisibleForTesting static final String GFXINFO_COMMAND_RESET = GFXINFO_COMMAND_GET + " reset";
- // Pattern matchers and enumerators to verify and pull gfxinfo metrics.
- // Example: "** Graphics info for pid 853 [com.google.android.leanbacklauncher] **"
- private static final String GFXINFO_OUTPUT_HEADER = "Graphics info for pid (\\d+) \\[(%s)\\]";
- // Note: use the [\\s\\S]* multi-line matcher to support String#matches(). Instead of splitting
- // the larger sections into more granular lines, we can match across all lines for simplicity.
- private static final String MULTILINE_MATCHER = "[\\s\\S]*%s[\\s\\S]*";
-
- public enum GfxInfoMetric {
- // Example: "Total frames rendered: 20391"
- TOTAL_FRAMES(
- Pattern.compile(".*Total frames rendered: (\\d+).*", Pattern.DOTALL),
- 1,
- "total_frames"),
- // Example: "Janky frames: 785 (3.85%)"
- JANKY_FRAMES_COUNT(
- Pattern.compile(
- ".*Janky frames: (\\d+) \\(([0-9]+[\\.]?[0-9]+)\\%\\).*", Pattern.DOTALL),
- 1,
- "janky_frames_count"),
- // Example: "Janky frames: 785 (3.85%)"
- JANKY_FRAMES_PRCNT(
- Pattern.compile(
- ".*Janky frames: (\\d+) \\(([0-9]+[\\.]?[0-9]+)\\%\\).*", Pattern.DOTALL),
- 2,
- "janky_frames_percent"),
- // Example: "Janky frames (legacy): 785 (3.85%)"
- JANKY_FRAMES_LEGACY_COUNT(
- Pattern.compile(
- ".*Janky frames \\(legacy\\): (\\d+) \\(([0-9]+[\\.]?[0-9]+)\\%\\).*",
- Pattern.DOTALL),
- 1,
- "janky_frames_legacy_count"),
- // Example: "Janky frames (legacy): 785 (3.85%)"
- JANKY_FRAMES_LEGACY_PRCNT(
- Pattern.compile(
- ".*Janky frames \\(legacy\\): (\\d+) \\(([0-9]+[\\.]?[0-9]+)\\%\\).*",
- Pattern.DOTALL),
- 2,
- "janky_frames_legacy_percent"),
- // Example: "50th percentile: 9ms"
- FRAME_TIME_50TH(
- Pattern.compile(".*50th percentile: (\\d+)ms.*", Pattern.DOTALL),
- 1,
- "frame_render_time_percentile_50"),
- // Example: "90th percentile: 9ms"
- FRAME_TIME_90TH(
- Pattern.compile(".*90th percentile: (\\d+)ms.*", Pattern.DOTALL),
- 1,
- "frame_render_time_percentile_90"),
- // Example: "95th percentile: 9ms"
- FRAME_TIME_95TH(
- Pattern.compile(".*95th percentile: (\\d+)ms.*", Pattern.DOTALL),
- 1,
- "frame_render_time_percentile_95"),
- // Example: "99th percentile: 9ms"
- FRAME_TIME_99TH(
- Pattern.compile(".*99th percentile: (\\d+)ms.*", Pattern.DOTALL),
- 1,
- "frame_render_time_percentile_99"),
- // Example: "Number Missed Vsync: 0"
- NUM_MISSED_VSYNC(
- Pattern.compile(".*Number Missed Vsync: (\\d+).*", Pattern.DOTALL),
- 1,
- "missed_vsync"),
- // Example: "Number High input latency: 0"
- NUM_HIGH_INPUT_LATENCY(
- Pattern.compile(".*Number High input latency: (\\d+).*", Pattern.DOTALL),
- 1,
- "high_input_latency"),
- // Example: "Number Slow UI thread: 0"
- NUM_SLOW_UI_THREAD(
- Pattern.compile(".*Number Slow UI thread: (\\d+).*", Pattern.DOTALL),
- 1,
- "slow_ui_thread"),
- // Example: "Number Slow bitmap uploads: 0"
- NUM_SLOW_BITMAP_UPLOADS(
- Pattern.compile(".*Number Slow bitmap uploads: (\\d+).*", Pattern.DOTALL),
- 1,
- "slow_bmp_upload"),
- // Example: "Number Slow issue draw commands: 0"
- NUM_SLOW_DRAW(
- Pattern.compile(".*Number Slow issue draw commands: (\\d+).*", Pattern.DOTALL),
- 1,
- "slow_issue_draw_cmds"),
- // Example: "Number Frame deadline missed: 0"
- NUM_FRAME_DEADLINE_MISSED(
- Pattern.compile(".*Number Frame deadline missed: (\\d+).*", Pattern.DOTALL),
- 1,
- "deadline_missed"),
- // Number Frame deadline missed (legacy): 0
- NUM_FRAME_DEADLINE_MISSED_LEGACY(
- Pattern.compile(
- ".*Number Frame deadline missed \\(legacy\\): (\\d+).*", Pattern.DOTALL),
- 1,
- "deadline_missed_legacy"),
- // Example: "50th gpu percentile: 9ms"
- GPU_FRAME_TIME_50TH(
- Pattern.compile(".*50th gpu percentile: (\\d+)ms.*", Pattern.DOTALL),
- 1,
- "gpu_frame_render_time_percentile_50"),
- // Example: "90th gpu percentile: 9ms"
- GPU_FRAME_TIME_90TH(
- Pattern.compile(".*90th gpu percentile: (\\d+)ms.*", Pattern.DOTALL),
- 1,
- "gpu_frame_render_time_percentile_90"),
- // Example: "95th gpu percentile: 9ms"
- GPU_FRAME_TIME_95TH(
- Pattern.compile(".*95th gpu percentile: (\\d+)ms.*", Pattern.DOTALL),
- 1,
- "gpu_frame_render_time_percentile_95"),
- // Example: "99th gpu percentile: 9ms"
- GPU_FRAME_TIME_99TH(
- Pattern.compile(".*99th gpu percentile: (\\d+)ms.*", Pattern.DOTALL),
- 1,
- "gpu_frame_render_time_percentile_99");
-
- private final Pattern mPattern;
- private final int mGroupIndex;
- private final String mMetricId;
-
- GfxInfoMetric(Pattern pattern, int groupIndex, String metricId) {
- mPattern = pattern;
- mGroupIndex = groupIndex;
- mMetricId = metricId;
- }
-
- @Nullable
- public Double parse(@NonNull String lines) {
- Matcher matcher = mPattern.matcher(lines);
- if (matcher.matches()) {
- return Double.valueOf(matcher.group(mGroupIndex));
- } else {
- return null;
- }
- }
-
- @NonNull
- public String getMetricId() {
- return mMetricId;
- }
- }
-
- private final Set<String> mTrackedPackages = new HashSet<>();
- private UiDevice mDevice;
-
- /** Clear existing jank metrics, unless explicitly configured. */
- public boolean startCollecting() {
- if (mTrackedPackages.isEmpty()) {
- clearGfxInfo();
- } else {
- int exceptionCount = 0;
- Exception lastException = null;
- for (String pkg : mTrackedPackages) {
- try {
- clearGfxInfo(pkg);
- } catch (Exception e) {
- Log.e(LOG_TAG, "Encountered exception resetting gfxinfo.", e);
- lastException = e;
- exceptionCount++;
- }
- }
- // Throw exceptions after to not quit on a single failure.
- if (exceptionCount > 1) {
- throw new RuntimeException(
- "Multiple exceptions were encountered resetting gfxinfo. Reporting the last"
- + " one only; others are visible in logs.",
- lastException);
- } else if (exceptionCount == 1) {
- throw new RuntimeException(
- "Encountered exception resetting gfxinfo.", lastException);
- }
- }
- // No exceptions denotes success.
- return true;
- }
-
- /** Collect the {@code gfxinfo} metrics for tracked processes (or all, if unspecified). */
- @NonNull
- public Map<String, Double> getMetrics() {
- Map<String, Double> result = new HashMap<>();
- if (mTrackedPackages.isEmpty()) {
- result.putAll(getGfxInfoMetrics());
- } else {
- int exceptionCount = 0;
- Exception lastException = null;
- for (String pkg : mTrackedPackages) {
- try {
- result.putAll(getGfxInfoMetrics(pkg));
- } catch (Exception e) {
- Log.e(LOG_TAG, "Encountered exception getting gfxinfo.", e);
- lastException = e;
- exceptionCount++;
- }
- }
- // Throw exceptions after to ensure all failures are reported. The metrics will still
- // not be collected at this point, but it will possibly make the issue cause clearer.
- if (exceptionCount > 1) {
- throw new RuntimeException(
- "Multiple exceptions were encountered getting gfxinfo. Reporting the last"
- + " one only; others are visible in logs.",
- lastException);
- } else if (exceptionCount == 1) {
- throw new RuntimeException("Encountered exception getting gfxinfo.", lastException);
- }
- }
- return result;
- }
-
- /** Do nothing, because nothing is needed to disable jank. */
- public boolean stopCollecting() {
- return true;
- }
-
- /** Add a package or list of packages to be tracked. */
- public void addTrackedPackages(@NonNull String... packages) {
- Collections.addAll(mTrackedPackages, packages);
- }
-
- /** Clear the {@code gfxinfo} for all packages. */
- @VisibleForTesting
- void clearGfxInfo() {
- // Not specifying a package will clear everything.
- clearGfxInfo("");
- }
-
- /** Clear the {@code gfxinfo} for the {@code pkg} specified. */
- @VisibleForTesting
- void clearGfxInfo(String pkg) {
- try {
- if (pkg.isEmpty()) {
- String command = String.format(GFXINFO_COMMAND_RESET, "--");
- String output = getDevice().executeShellCommand(command);
- // Success if any header (set by passing an empty-string) exists in the output.
- verifyMatches(output, getHeaderMatcher(""), "No package headers in output.");
- Log.v(LOG_TAG, "Cleared all gfxinfo.");
- } else {
- String command = String.format(GFXINFO_COMMAND_RESET, pkg);
- String output = getDevice().executeShellCommand(command);
- // Success if the specified package header exists in the output.
- verifyMatches(output, getHeaderMatcher(pkg), "No package header in output.");
- Log.v(LOG_TAG, String.format("Cleared %s gfxinfo.", pkg));
- }
- } catch (IOException e) {
- throw new RuntimeException("Failed to clear gfxinfo.", e);
- }
- }
-
- /** Return a {@code Map<String, Double>} of {@code gfxinfo} metrics for all processes. */
- @VisibleForTesting
- Map<String, Double> getGfxInfoMetrics() {
- return getGfxInfoMetrics("");
- }
-
- /** Return a {@code Map<String, Double>} of {@code gfxinfo} metrics for {@code pkg}. */
- @VisibleForTesting
- @SuppressWarnings("StringSplitter")
- Map<String, Double> getGfxInfoMetrics(String pkg) {
- try {
- String command = String.format(GFXINFO_COMMAND_GET, pkg);
- String output = getDevice().executeShellCommand(command);
- verifyMatches(output, getHeaderMatcher(pkg), "Missing package header.");
- // Split each new section starting with two asterisks '**', and then query and append
- // all metrics. This method supports both single-package and multi-package outputs.
- String[] pkgMetricSections = output.split("\n\\*\\*");
- Map<String, Double> result = new HashMap<>();
- // Skip the 1st section, which contains only header information.
- for (int i = 1; i < pkgMetricSections.length; i++) {
- result.putAll(parseGfxInfoMetrics(pkgMetricSections[i]));
- }
- return result;
- } catch (IOException e) {
- throw new RuntimeException("Failed to get gfxinfo.", e);
- }
- }
-
- /** Parse the {@code output} of {@code gfxinfo} to a {@code Map<String, Double>} of metrics. */
- private Map<String, Double> parseGfxInfoMetrics(String output) {
- Matcher header = Pattern.compile(getHeaderMatcher("")).matcher(output);
- if (!header.matches()) {
- throw new RuntimeException("Failed to parse package from gfxinfo output.");
- }
- // Package name is the only required field.
- String packageName = header.group(2);
- Log.v(LOG_TAG, String.format("Collecting metrics for: %s", packageName));
- // Parse each metric from the results via a common pattern.
- Map<String, Double> results = new HashMap<String, Double>();
- for (GfxInfoMetric metric : GfxInfoMetric.values()) {
- String metricKey =
- constructKey(GFXINFO_METRICS_PREFIX, packageName, metric.getMetricId());
- // Find the metric or log that it's missing.
- Double value = metric.parse(output);
- if (value == null) {
- Log.d(LOG_TAG, String.format("Did not find %s from %s", metricKey, packageName));
- } else {
- results.put(metricKey, value);
- }
- }
- return results;
- }
-
- private String constructKey(@NonNull String ...tokens) {
- return TextUtils.join("_", tokens);
- }
-
- /**
- * Returns a matcher {@code String} for {@code pkg}'s {@code gfxinfo} headers.
- *
- * <p>Note: {@code pkg} may be empty.
- */
- private String getHeaderMatcher(String pkg) {
- return String.format(
- MULTILINE_MATCHER,
- String.format(GFXINFO_OUTPUT_HEADER, (pkg.isEmpty() ? ".*" : pkg)));
- }
-
- /** Verify the {@code output} matches {@code match}, or throw if not. */
- private void verifyMatches(String output, String match, String message, Object... args) {
- if (!output.matches(match)) {
- throw new IllegalStateException(String.format(message, args));
- }
- }
-
- /** Returns the {@link UiDevice} under test. */
- @NonNull
- @VisibleForTesting
- protected UiDevice getDevice() {
- if (mDevice == null) {
- mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
- }
- return mDevice;
- }
-}
diff --git a/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Metric.kt b/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Metric.kt
index 53b41ee..9e57fb3 100644
--- a/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Metric.kt
+++ b/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Metric.kt
@@ -33,7 +33,6 @@
import androidx.benchmark.macro.perfetto.Slice
import androidx.benchmark.macro.perfetto.StartupTimingQuery
import androidx.benchmark.macro.perfetto.camelCase
-import androidx.test.platform.app.InstrumentationRegistry
/**
* Metric interface.
@@ -115,109 +114,6 @@
}
/**
- * Legacy version of FrameTimingMetric, based on 'dumpsys gfxinfo' instead of trace data.
- *
- * Temporary - to be removed after transition to FrameTimingMetric
- */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
-public class FrameTimingGfxInfoMetric : Metric() {
- private lateinit var packageName: String
- private val helper = JankCollectionHelper()
-
- internal override fun configure(packageName: String) {
- this.packageName = packageName
- helper.addTrackedPackages(packageName)
- }
-
- internal override fun start() {
- try {
- helper.startCollecting()
- } catch (exception: RuntimeException) {
- // Ignore the exception that might result from trying to clear GfxInfo
- // The current implementation of JankCollectionHelper throws a RuntimeException
- // when that happens. This is safe to ignore because the app being benchmarked
- // is not showing any UI when this happens typically.
-
- // Once the MacroBenchmarkRule has the ability to setup the app in the right state via
- // a designated setup block, we can get rid of this.
- val instrumentation = InstrumentationRegistry.getInstrumentation()
- if (instrumentation != null) {
- if (!Shell.isPackageAlive(packageName)) {
- error(exception.message ?: "Assertion error, $packageName not running")
- }
- }
- }
- }
-
- internal override fun stop() {
- helper.stopCollecting()
- }
-
- /**
- * Used to convert keys from platform to JSON format.
- *
- * This both converts `snake_case_format` to `camelCaseFormat`, and renames for clarity.
- *
- * Note that these will still output to inst results in snake_case, with `MetricNameUtils`
- * via [androidx.benchmark.MetricResult.putInBundle].
- */
- private val keyRenameMap = mapOf(
- "frame_render_time_percentile_50" to "frameTime50thPercentileMs",
- "frame_render_time_percentile_90" to "frameTime90thPercentileMs",
- "frame_render_time_percentile_95" to "frameTime95thPercentileMs",
- "frame_render_time_percentile_99" to "frameTime99thPercentileMs",
- "gpu_frame_render_time_percentile_50" to "gpuFrameTime50thPercentileMs",
- "gpu_frame_render_time_percentile_90" to "gpuFrameTime90thPercentileMs",
- "gpu_frame_render_time_percentile_95" to "gpuFrameTime95thPercentileMs",
- "gpu_frame_render_time_percentile_99" to "gpuFrameTime99thPercentileMs",
- "missed_vsync" to "vsyncMissedFrameCount",
- "deadline_missed" to "deadlineMissedFrameCount",
- "deadline_missed_legacy" to "deadlineMissedFrameCountLegacy",
- "janky_frames_count" to "jankyFrameCount",
- "janky_frames_legacy_count" to "jankyFrameCountLegacy",
- "high_input_latency" to "highInputLatencyFrameCount",
- "slow_ui_thread" to "slowUiThreadFrameCount",
- "slow_bmp_upload" to "slowBitmapUploadFrameCount",
- "slow_issue_draw_cmds" to "slowIssueDrawCommandsFrameCount",
- "total_frames" to "totalFrameCount",
- "janky_frames_percent" to "jankyFramePercent",
- "janky_frames_legacy_percent" to "jankyFramePercentLegacy"
- )
-
- /**
- * Filters output to only frameTimeXXthPercentileMs and totalFrameCount
- */
- private val keyAllowList = setOf(
- "frameTime50thPercentileMs",
- "frameTime90thPercentileMs",
- "frameTime95thPercentileMs",
- "frameTime99thPercentileMs",
- "totalFrameCount"
- )
-
- internal override fun getMetrics(
- captureInfo: CaptureInfo,
- perfettoTraceProcessor: PerfettoTraceProcessor
- ) = IterationResult(
- singleMetrics = helper.metrics
- .map {
- val prefix = "gfxinfo_${packageName}_"
- val keyWithoutPrefix = it.key.removePrefix(prefix)
-
- if (keyWithoutPrefix != it.key && keyRenameMap.containsKey(keyWithoutPrefix)) {
- keyRenameMap[keyWithoutPrefix]!! to it.value
- } else {
- throw IllegalStateException("Unexpected key ${it.key}")
- }
- }
- .toMap()
- .filterKeys { keyAllowList.contains(it) },
- sampledMetrics = emptyMap(),
- timelineRangeNs = null
- )
-}
-
-/**
* Metric which captures timing information from frames produced by a benchmark, such as
* a scrolling or animation benchmark.
*
diff --git a/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/GridBenchmark.kt b/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/GridBenchmark.kt
index 6a71552..acae3fa 100644
--- a/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/GridBenchmark.kt
+++ b/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/GridBenchmark.kt
@@ -19,7 +19,6 @@
import android.content.Intent
import android.graphics.Point
import androidx.benchmark.macro.CompilationMode
-import androidx.benchmark.macro.FrameTimingGfxInfoMetric
import androidx.benchmark.macro.FrameTimingMetric
import androidx.benchmark.macro.junit4.MacrobenchmarkRule
import androidx.test.filters.LargeTest
@@ -53,7 +52,7 @@
fun scroll() {
benchmarkRule.measureRepeated(
packageName = PACKAGE_NAME,
- metrics = listOf(FrameTimingMetric(), FrameTimingGfxInfoMetric()),
+ metrics = listOf(FrameTimingMetric()),
compilationMode = compilationMode,
iterations = 10,
setupBlock = {
diff --git a/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/TrivialListScrollBenchmark.kt b/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/TrivialListScrollBenchmark.kt
index cb24edb..acadad9 100644
--- a/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/TrivialListScrollBenchmark.kt
+++ b/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/benchmark/integration/macrobenchmark/TrivialListScrollBenchmark.kt
@@ -19,7 +19,6 @@
import android.content.Intent
import android.graphics.Point
import androidx.benchmark.macro.CompilationMode
-import androidx.benchmark.macro.FrameTimingGfxInfoMetric
import androidx.benchmark.macro.FrameTimingMetric
import androidx.benchmark.macro.junit4.MacrobenchmarkRule
import androidx.test.filters.LargeTest
@@ -53,7 +52,7 @@
fun start() {
benchmarkRule.measureRepeated(
packageName = PACKAGE_NAME,
- metrics = listOf(FrameTimingMetric(), FrameTimingGfxInfoMetric()),
+ metrics = listOf(FrameTimingMetric()),
compilationMode = compilationMode,
iterations = 10,
setupBlock = {
diff --git a/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/AndroidViewListScrollBenchmark.kt b/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/AndroidViewListScrollBenchmark.kt
index edc54b5..2c7b6a6 100644
--- a/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/AndroidViewListScrollBenchmark.kt
+++ b/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/AndroidViewListScrollBenchmark.kt
@@ -19,7 +19,6 @@
import android.content.Intent
import android.graphics.Point
import androidx.benchmark.macro.CompilationMode
-import androidx.benchmark.macro.FrameTimingGfxInfoMetric
import androidx.benchmark.macro.FrameTimingMetric
import androidx.benchmark.macro.junit4.MacrobenchmarkRule
import androidx.test.filters.LargeTest
@@ -54,7 +53,7 @@
fun scroll() {
benchmarkRule.measureRepeated(
packageName = PACKAGE_NAME,
- metrics = listOf(FrameTimingMetric(), FrameTimingGfxInfoMetric()),
+ metrics = listOf(FrameTimingMetric()),
compilationMode = compilationMode,
iterations = 10,
setupBlock = {
diff --git a/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/DifferentTypesListScrollBenchmark.kt b/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/DifferentTypesListScrollBenchmark.kt
index bd78944..624bd7a 100644
--- a/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/DifferentTypesListScrollBenchmark.kt
+++ b/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/DifferentTypesListScrollBenchmark.kt
@@ -19,7 +19,6 @@
import android.content.Intent
import android.graphics.Point
import androidx.benchmark.macro.CompilationMode
-import androidx.benchmark.macro.FrameTimingGfxInfoMetric
import androidx.benchmark.macro.FrameTimingMetric
import androidx.benchmark.macro.junit4.MacrobenchmarkRule
import androidx.test.filters.LargeTest
@@ -54,7 +53,7 @@
fun start() {
benchmarkRule.measureRepeated(
packageName = PACKAGE_NAME,
- metrics = listOf(FrameTimingMetric(), FrameTimingGfxInfoMetric()),
+ metrics = listOf(FrameTimingMetric()),
compilationMode = compilationMode,
iterations = 10,
setupBlock = {
diff --git a/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/GridBenchmark.kt b/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/GridBenchmark.kt
index 6efb912..3fe31df 100644
--- a/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/GridBenchmark.kt
+++ b/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/GridBenchmark.kt
@@ -19,7 +19,6 @@
import android.content.Intent
import android.graphics.Point
import androidx.benchmark.macro.CompilationMode
-import androidx.benchmark.macro.FrameTimingGfxInfoMetric
import androidx.benchmark.macro.FrameTimingMetric
import androidx.benchmark.macro.junit4.MacrobenchmarkRule
import androidx.test.filters.LargeTest
@@ -54,7 +53,7 @@
fun scroll() {
benchmarkRule.measureRepeated(
packageName = PACKAGE_NAME,
- metrics = listOf(FrameTimingMetric(), FrameTimingGfxInfoMetric()),
+ metrics = listOf(FrameTimingMetric()),
compilationMode = compilationMode,
iterations = 10,
setupBlock = {
diff --git a/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/NestedListsScrollBenchmark.kt b/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/NestedListsScrollBenchmark.kt
index 9b20220..6ef3995 100644
--- a/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/NestedListsScrollBenchmark.kt
+++ b/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/NestedListsScrollBenchmark.kt
@@ -19,7 +19,6 @@
import android.content.Intent
import android.graphics.Point
import androidx.benchmark.macro.CompilationMode
-import androidx.benchmark.macro.FrameTimingGfxInfoMetric
import androidx.benchmark.macro.FrameTimingMetric
import androidx.benchmark.macro.junit4.MacrobenchmarkRule
import androidx.test.filters.LargeTest
@@ -54,7 +53,7 @@
fun start() {
benchmarkRule.measureRepeated(
packageName = PACKAGE_NAME,
- metrics = listOf(FrameTimingMetric(), FrameTimingGfxInfoMetric()),
+ metrics = listOf(FrameTimingMetric()),
compilationMode = compilationMode,
iterations = 10,
setupBlock = {
diff --git a/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/RecyclerViewListScrollBenchmark.kt b/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/RecyclerViewListScrollBenchmark.kt
index e4b5857..97298ca 100644
--- a/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/RecyclerViewListScrollBenchmark.kt
+++ b/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/RecyclerViewListScrollBenchmark.kt
@@ -19,7 +19,6 @@
import android.content.Intent
import android.graphics.Point
import androidx.benchmark.macro.CompilationMode
-import androidx.benchmark.macro.FrameTimingGfxInfoMetric
import androidx.benchmark.macro.FrameTimingMetric
import androidx.benchmark.macro.junit4.MacrobenchmarkRule
import androidx.test.filters.LargeTest
@@ -53,7 +52,7 @@
fun start() {
benchmarkRule.measureRepeated(
packageName = PACKAGE_NAME,
- metrics = listOf(FrameTimingMetric(), FrameTimingGfxInfoMetric()),
+ metrics = listOf(FrameTimingMetric()),
compilationMode = compilationMode,
iterations = 10,
setupBlock = {
diff --git a/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/TrivialListScrollBenchmark.kt b/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/TrivialListScrollBenchmark.kt
index 69dc8d6..6d0939c 100644
--- a/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/TrivialListScrollBenchmark.kt
+++ b/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/compose/integration/macrobenchmark/TrivialListScrollBenchmark.kt
@@ -19,7 +19,6 @@
import android.content.Intent
import android.graphics.Point
import androidx.benchmark.macro.CompilationMode
-import androidx.benchmark.macro.FrameTimingGfxInfoMetric
import androidx.benchmark.macro.FrameTimingMetric
import androidx.benchmark.macro.junit4.MacrobenchmarkRule
import androidx.test.filters.LargeTest
@@ -54,7 +53,7 @@
fun start() {
benchmarkRule.measureRepeated(
packageName = PACKAGE_NAME,
- metrics = listOf(FrameTimingMetric(), FrameTimingGfxInfoMetric()),
+ metrics = listOf(FrameTimingMetric()),
compilationMode = compilationMode,
iterations = 10,
setupBlock = {
diff --git a/wear/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/benchmark/integration/macrobenchmark/ScrollBenchmark.kt b/wear/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/benchmark/integration/macrobenchmark/ScrollBenchmark.kt
index dad771c..b63c5ee 100644
--- a/wear/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/benchmark/integration/macrobenchmark/ScrollBenchmark.kt
+++ b/wear/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/benchmark/integration/macrobenchmark/ScrollBenchmark.kt
@@ -19,7 +19,6 @@
import android.content.Intent
import android.graphics.Point
import androidx.benchmark.macro.CompilationMode
-import androidx.benchmark.macro.FrameTimingGfxInfoMetric
import androidx.benchmark.macro.FrameTimingMetric
import androidx.benchmark.macro.junit4.MacrobenchmarkRule
import androidx.test.filters.LargeTest
@@ -53,7 +52,7 @@
fun start() {
benchmarkRule.measureRepeated(
packageName = PACKAGE_NAME,
- metrics = listOf(FrameTimingMetric(), FrameTimingGfxInfoMetric()),
+ metrics = listOf(FrameTimingMetric()),
compilationMode = compilationMode,
iterations = 10,
setupBlock = {
diff --git a/wear/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/benchmark/integration/macrobenchmark/SwipeBenchmark.kt b/wear/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/benchmark/integration/macrobenchmark/SwipeBenchmark.kt
index ac2b1eb..542700e 100644
--- a/wear/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/benchmark/integration/macrobenchmark/SwipeBenchmark.kt
+++ b/wear/benchmark/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/benchmark/integration/macrobenchmark/SwipeBenchmark.kt
@@ -18,7 +18,6 @@
import android.content.Intent
import androidx.benchmark.macro.CompilationMode
-import androidx.benchmark.macro.FrameTimingGfxInfoMetric
import androidx.benchmark.macro.FrameTimingMetric
import androidx.benchmark.macro.junit4.MacrobenchmarkRule
import androidx.test.filters.LargeTest
@@ -53,7 +52,7 @@
fun start() {
benchmarkRule.measureRepeated(
packageName = PACKAGE_NAME,
- metrics = listOf(FrameTimingMetric(), FrameTimingGfxInfoMetric()),
+ metrics = listOf(FrameTimingMetric()),
compilationMode = compilationMode,
iterations = 10,
setupBlock = {
diff --git a/wear/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/compose/integration/macrobenchmark/ScrollBenchmark.kt b/wear/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/compose/integration/macrobenchmark/ScrollBenchmark.kt
index 453ae52..ced270c 100644
--- a/wear/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/compose/integration/macrobenchmark/ScrollBenchmark.kt
+++ b/wear/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/compose/integration/macrobenchmark/ScrollBenchmark.kt
@@ -19,7 +19,6 @@
import android.content.Intent
import android.graphics.Point
import androidx.benchmark.macro.CompilationMode
-import androidx.benchmark.macro.FrameTimingGfxInfoMetric
import androidx.benchmark.macro.FrameTimingMetric
import androidx.benchmark.macro.junit4.MacrobenchmarkRule
import androidx.test.filters.LargeTest
@@ -53,7 +52,7 @@
fun start() {
benchmarkRule.measureRepeated(
packageName = PACKAGE_NAME,
- metrics = listOf(FrameTimingMetric(), FrameTimingGfxInfoMetric()),
+ metrics = listOf(FrameTimingMetric()),
compilationMode = compilationMode,
iterations = 10,
setupBlock = {
diff --git a/wear/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/compose/integration/macrobenchmark/SwipeBenchmark.kt b/wear/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/compose/integration/macrobenchmark/SwipeBenchmark.kt
index 1721bec..94d3d47 100644
--- a/wear/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/compose/integration/macrobenchmark/SwipeBenchmark.kt
+++ b/wear/compose/integration-tests/macrobenchmark/src/androidTest/java/androidx/wear/compose/integration/macrobenchmark/SwipeBenchmark.kt
@@ -18,7 +18,6 @@
import android.content.Intent
import androidx.benchmark.macro.CompilationMode
-import androidx.benchmark.macro.FrameTimingGfxInfoMetric
import androidx.benchmark.macro.FrameTimingMetric
import androidx.benchmark.macro.junit4.MacrobenchmarkRule
import androidx.test.filters.LargeTest
@@ -53,7 +52,7 @@
fun start() {
benchmarkRule.measureRepeated(
packageName = PACKAGE_NAME,
- metrics = listOf(FrameTimingMetric(), FrameTimingGfxInfoMetric()),
+ metrics = listOf(FrameTimingMetric()),
compilationMode = compilationMode,
iterations = 10,
setupBlock = {