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

syntax = "proto2";

package perfetto.protos;

message AndroidCameraMetric {
  message Counter {
    optional double min = 1;
    optional double max = 2;
    optional double avg = 3;
  }

  // Counter for the sum of DMA and RSS across GCA, cameraserver
  // and HAL. This provides a single number for the memory
  // pressure using the camera is putting on the rest of the
  // system.
  //
  // Note: this number assumes that all DMA pressure is coming
  // from the camera as this is usually a pretty good
  // approximation. Being more accurate here would increase the
  // complexity of the metric significantly.
  //
  // Note: if there are multiple GCA/cameraserver/HAL processes
  // in the trace, this metric will simply take the latest
  // one in the trace and ignore the others.
  optional Counter gc_rss_and_dma = 1;
}
