diff options
author | Daniele Di Proietto <ddiproietto@google.com> | 2023-05-30 12:56:46 +0000 |
---|---|---|
committer | Cherrypicker Worker <android-build-cherrypicker-worker@google.com> | 2023-05-30 15:42:39 +0000 |
commit | a912d1efd939190b9cbfc3efbef0f3902a94d760 (patch) | |
tree | 6e5c7118519b8961f5660652a3955a63f191be38 | |
parent | f6ebb86611be914d708d17ab2a4701a1dca81fc4 (diff) | |
download | perfetto-a912d1efd939190b9cbfc3efbef0f3902a94d760.tar.gz |
Make trace smaller in CtsPerfettoReporterTestCases
The reporter test only works with a trace that's smaller than 1Kb.
Recent additions to the tracing service (chunk usage stats) caused the
final trace size to be bigger than that on some devices or builds (the
device and build names are included in the trace).
This commit fixes the problem by disabling a bunch of tracing service
feature. This reduces the tracing size on redfin from 1020 bytes to 400
bytes.
Bug: 282508742
(cherry picked from https://android-review.googlesource.com/q/commit:f3935233188da29f7f772f7685cbc4d1e014f06b)
Merged-In: I6c17948e7983828eb4f11bf760f71d8055b777ba
Change-Id: I6c17948e7983828eb4f11bf760f71d8055b777ba
-rw-r--r-- | test/cts/reporter/reporter_test_cts.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/cts/reporter/reporter_test_cts.cc b/test/cts/reporter/reporter_test_cts.cc index f27d3daba..8745dcf78 100644 --- a/test/cts/reporter/reporter_test_cts.cc +++ b/test/cts/reporter/reporter_test_cts.cc @@ -44,6 +44,13 @@ TEST(PerfettoReporterTest, TestEndToEndReport) { trace_config.set_allow_user_build_tracing(true); trace_config.set_unique_session_name("TestEndToEndReport"); + // Make the trace as small as possible (see b/282508742). + auto* builtin = trace_config.mutable_builtin_data_sources(); + builtin->set_disable_clock_snapshotting(true); + builtin->set_disable_system_info(true); + builtin->set_disable_service_events(true); + builtin->set_disable_chunk_usage_histograms(true); + auto* ds_config = trace_config.add_data_sources()->mutable_config(); ds_config->set_name("android.perfetto.FakeProducer"); ds_config->set_target_buffer(0); |