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

import "protos/perfetto/metrics/android/process_metadata.proto";

message AndroidFrameTimelineMetric {
  message ProcessBreakdown {
    optional AndroidProcessMetadata process = 3;

    optional int64 total_frames = 4;
    optional int64 missed_frames = 5;
    optional int64 missed_app_frames = 6;
    optional int64 missed_sf_frames = 7;

    optional int64 frame_dur_max = 8;
    optional int64 frame_dur_avg = 9;
    optional int64 frame_dur_p50 = 10;
    optional int64 frame_dur_p90 = 11;
    optional int64 frame_dur_p95 = 12;
    optional int64 frame_dur_p99 = 13;

    reserved 1, 2;
  }

  optional int64 total_frames = 4;
  optional int64 missed_app_frames = 5;

  repeated ProcessBreakdown process = 2;

  reserved 1;
}

