Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 183b7d30 authored by Pablo Gamito's avatar Pablo Gamito
Browse files

Add UiTracing trace slice duration metrics to test metrics

So that these metrics are collected in the tests and upload to crystalball for tracking and regression filing

Bug: 406267473
Flag: TEST_ONLY
Test: atest UiTracingPerfTests
Change-Id: I367538ef3b66dc45cabe92a4cf6694997202c0db
parent eff347d1
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -12,24 +12,34 @@
// See the License for the specific language governing permissions and
// limitations under the License.

filegroup {
    name: "ui-tracing-metric-specs",
    srcs: [
        "metric_specs/*",
    ],
}

android_test {
    name: "UiTracingPerfTests",
    team: "trendy_team_windowing_tools",
    srcs: ["src/**/*.java"],
    static_libs: [
        "androidx.test.rules",
        "androidx.annotation_annotation",
        "androidx.test.rules",
        "apct-perftests-utils",
        "collector-device-lib",
        "collector-device-lib-platform",
        "platform-test-annotations",
        "perfetto_trace_java_protos",
        "platform-test-annotations",
    ],
    test_suites: [
        "device-tests",
        "performance-tests",
    ],
    data: [":perfetto_artifacts"],
    data: [
        ":perfetto_artifacts",
        ":ui-tracing-metric-specs",
    ],
    platform_apis: true,
    certificate: "platform",
}
+16 −0
Original line number Diff line number Diff line
@@ -84,6 +84,22 @@
        <option name="collect-on-run-ended-only" value="false"/>
    </metrics_collector>

    <metrics_collector class="com.android.tradefed.device.metric.PerfettoPullerMetricCollector">
        <option name="trace-processor-binary" value="trace_processor_shell"/>
        <option name="perfetto-v1-metrics" value="false"/>
        <option name="perfetto-v2-metrics" value="true"/>
        <option name="perfetto-v2-metrics-ids" value="avg_runtime_per_uitracing_slice" />
        <option name="summary-spec-file-name" value="avg_runtime_per_uitracing_slice.textproto" />
        <option name="trace-processor-timeout" value="120000"/>
        <option name="pull-pattern-keys" value="perfetto_file_path"/>
        <option name="clean-up" value="false"/>
        <option name="collect-on-run-ended-only" value="false"/>
    </metrics_collector>

    <metric_post_processor class="com.android.tradefed.postprocessor.PerfettoGenericPostProcessor">
        <option name="perfetto-proto-file-prefix" value="metric_v2_perfetto"/>
    </metric_post_processor>

    <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
        <option name="pull-pattern-keys" value="managed_heapdump_file.*"/>
        <option name="pull-pattern-keys" value="android.device.collectors.LogcatCollector.*"/>