/*
 * Copyright (C) 2025 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.
 */

syntax = "proto2";

package perfetto.protos;

// Configuration for the android.app_wakelocks data source.
message AppWakelocksConfig {
  // Specifies the delay (in milliseconds) after which the data source will
  // attempt to write events. Writing less frequently reduces the trace size by
  // making better use of the packed arrays and reducing the total number of
  // TracePackets needed (which each have dozens of bytes of overhead). The
  // suggested delay is 5000ms.
  optional int32 write_delay_ms = 1;

  // When set, wakelocks held for less than this amount of time are filtered
  // from the resulting trace. Note: duration is computed by matching wakelocks
  // with identical attributes, not by tracking the underlying objects. The
  // threshold should be < the trace's flush_period_ms.
  optional int32 filter_duration_below_ms = 2;

  // When true, the owner_pid is dropped from the resulting output, reducing the
  // size of the interning tables.
  optional bool drop_owner_pid = 3;
}
