/*
 * 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 AndroidCameraUnaggregatedMetric {
  message Value {
    optional int64 ts = 1;
    optional double gca_rss_val = 2;
    optional double hal_rss_val = 3;
    optional double cameraserver_rss_val = 4;
    optional double dma_val = 5;
    optional double value = 6;
  }

  // Timeseries 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.
  repeated Value gc_rss_and_dma = 1;
}
