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

// Metric that stores frame information and potential jank root causes
// for a single Android system UI interaction/user journey.
message AndroidSysUiCujMetrics {
  // A list of all frames within the SysUi user journey.
  repeated Frame frames = 1;

  optional string cuj_name = 2;
  optional int64 cuj_start = 3;
  optional int64 cuj_dur = 4;

  // Details about the process (uid, version, etc)
  optional AndroidProcessMetadata process = 5;

  message Frame {
    // Index of the frame within the single user journey.
    optional int64 number = 1;
    optional int64 vsync = 5;
    optional int64 ts = 2;
    optional int64 dur = 3;

    // A list of identified potential causes for jank.
    // Optional.
    repeated string jank_cause = 4;
  }
}
