//
// 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.

// @generated by protoc-gen-es v2.2.2 with parameter "target=ts"
// @generated from file protos/perfetto/metrics/android/android_frame_timeline_metric.proto (package perfetto.protos, syntax proto2)
/* eslint-disable */

import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
import type { AndroidProcessMetadata } from "./process_metadata_pb";
import { file_protos_perfetto_metrics_android_process_metadata } from "./process_metadata_pb";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file protos/perfetto/metrics/android/android_frame_timeline_metric.proto.
 */
export const file_protos_perfetto_metrics_android_android_frame_timeline_metric: GenFile = /*@__PURE__*/
  fileDesc("CkNwcm90b3MvcGVyZmV0dG8vbWV0cmljcy9hbmRyb2lkL2FuZHJvaWRfZnJhbWVfdGltZWxpbmVfbWV0cmljLnByb3RvEg9wZXJmZXR0by5wcm90b3MikAgKGkFuZHJvaWRGcmFtZVRpbWVsaW5lTWV0cmljEhQKDHRvdGFsX2ZyYW1lcxgEIAEoAxIZChFtaXNzZWRfYXBwX2ZyYW1lcxgFIAEoAxIWCg5kcm9wcGVkX2ZyYW1lcxgGIAEoAxJNCgdwcm9jZXNzGAIgAygLMjwucGVyZmV0dG8ucHJvdG9zLkFuZHJvaWRGcmFtZVRpbWVsaW5lTWV0cmljLlByb2Nlc3NCcmVha2Rvd24STgoKamFua190eXBlcxgHIAMoCzI6LnBlcmZldHRvLnByb3Rvcy5BbmRyb2lkRnJhbWVUaW1lbGluZU1ldHJpYy5KYW5rVHlwZU1ldHJpYxrsAQoOSmFua1R5cGVNZXRyaWMSDAoEdHlwZRgBIAEoCRITCgt0b3RhbF9jb3VudBgCIAEoAxIhChlwcmVzZW50X3Vuc3BlY2lmaWVkX2NvdW50GAMgASgDEh0KFXByZXNlbnRfb25fdGltZV9jb3VudBgEIAEoAxIaChJwcmVzZW50X2xhdGVfY291bnQYBSABKAMSGwoTcHJlc2VudF9lYXJseV9jb3VudBgGIAEoAxIdChVwcmVzZW50X2Ryb3BwZWRfY291bnQYByABKAMSHQoVcHJlc2VudF91bmtub3duX2NvdW50GAggASgDGpQEChBQcm9jZXNzQnJlYWtkb3duEjgKB3Byb2Nlc3MYAyABKAsyJy5wZXJmZXR0by5wcm90b3MuQW5kcm9pZFByb2Nlc3NNZXRhZGF0YRIUCgx0b3RhbF9mcmFtZXMYBCABKAMSFQoNbWlzc2VkX2ZyYW1lcxgFIAEoAxIZChFtaXNzZWRfYXBwX2ZyYW1lcxgGIAEoAxIYChBtaXNzZWRfc2ZfZnJhbWVzGAcgASgDEhUKDWZyYW1lX2R1cl9tYXgYCCABKAMSFQoNZnJhbWVfZHVyX2F2ZxgJIAEoAxIVCg1mcmFtZV9kdXJfcDUwGAogASgDEhUKDWZyYW1lX2R1cl9wOTAYCyABKAMSFQoNZnJhbWVfZHVyX3A5NRgMIAEoAxIVCg1mcmFtZV9kdXJfcDk5GA0gASgDEhgKEGZyYW1lX2R1cl9tc19wNTAYDiABKAESGAoQZnJhbWVfZHVyX21zX3A5MBgPIAEoARIYChBmcmFtZV9kdXJfbXNfcDk1GBAgASgBEhgKEGZyYW1lX2R1cl9tc19wOTkYESABKAESFgoOZHJvcHBlZF9mcmFtZXMYEiABKAMSTgoKamFua190eXBlcxgTIAMoCzI6LnBlcmZldHRvLnByb3Rvcy5BbmRyb2lkRnJhbWVUaW1lbGluZU1ldHJpYy5KYW5rVHlwZU1ldHJpY0oECAEQAkoECAIQA0oECAEQAg", [file_protos_perfetto_metrics_android_process_metadata]);

/**
 * @generated from message perfetto.protos.AndroidFrameTimelineMetric
 */
export type AndroidFrameTimelineMetric = Message<"perfetto.protos.AndroidFrameTimelineMetric"> & {
  /**
   * @generated from field: optional int64 total_frames = 4;
   */
  totalFrames: bigint;

  /**
   * @generated from field: optional int64 missed_app_frames = 5;
   */
  missedAppFrames: bigint;

  /**
   * @generated from field: optional int64 dropped_frames = 6;
   */
  droppedFrames: bigint;

  /**
   * @generated from field: repeated perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown process = 2;
   */
  process: AndroidFrameTimelineMetric_ProcessBreakdown[];

  /**
   * Metrics for each jank type globally
   *
   * @generated from field: repeated perfetto.protos.AndroidFrameTimelineMetric.JankTypeMetric jank_types = 7;
   */
  jankTypes: AndroidFrameTimelineMetric_JankTypeMetric[];
};

/**
 * Describes the message perfetto.protos.AndroidFrameTimelineMetric.
 * Use `create(AndroidFrameTimelineMetricSchema)` to create a new message.
 */
export const AndroidFrameTimelineMetricSchema: GenMessage<AndroidFrameTimelineMetric> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_metrics_android_android_frame_timeline_metric, 0);

/**
 * @generated from message perfetto.protos.AndroidFrameTimelineMetric.JankTypeMetric
 */
export type AndroidFrameTimelineMetric_JankTypeMetric = Message<"perfetto.protos.AndroidFrameTimelineMetric.JankTypeMetric"> & {
  /**
   * The jank type
   *
   * @generated from field: optional string type = 1;
   */
  type: string;

  /**
   * The count of frames with this jank type
   *
   * @generated from field: optional int64 total_count = 2;
   */
  totalCount: bigint;

  /**
   * The count of frames with this jank type and present type = PRESENT_UNSPECIFIED
   *
   * @generated from field: optional int64 present_unspecified_count = 3;
   */
  presentUnspecifiedCount: bigint;

  /**
   * The count of frames with this jank type and present type = PRESENT_ON_TIME
   *
   * @generated from field: optional int64 present_on_time_count = 4;
   */
  presentOnTimeCount: bigint;

  /**
   * The count of frames with this jank type and present type = PRESENT_LATE
   *
   * @generated from field: optional int64 present_late_count = 5;
   */
  presentLateCount: bigint;

  /**
   * The count of frames with this jank type and present type = PRESENT_EARLY
   *
   * @generated from field: optional int64 present_early_count = 6;
   */
  presentEarlyCount: bigint;

  /**
   * The count of frames with this jank type and present type = PRESENT_DROPPED
   *
   * @generated from field: optional int64 present_dropped_count = 7;
   */
  presentDroppedCount: bigint;

  /**
   * The count of frames with this jank type and present type = PRESENT_UNKNOWN
   *
   * @generated from field: optional int64 present_unknown_count = 8;
   */
  presentUnknownCount: bigint;
};

/**
 * Describes the message perfetto.protos.AndroidFrameTimelineMetric.JankTypeMetric.
 * Use `create(AndroidFrameTimelineMetric_JankTypeMetricSchema)` to create a new message.
 */
export const AndroidFrameTimelineMetric_JankTypeMetricSchema: GenMessage<AndroidFrameTimelineMetric_JankTypeMetric> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_metrics_android_android_frame_timeline_metric, 0, 0);

/**
 * @generated from message perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
 */
export type AndroidFrameTimelineMetric_ProcessBreakdown = Message<"perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown"> & {
  /**
   * @generated from field: optional perfetto.protos.AndroidProcessMetadata process = 3;
   */
  process?: AndroidProcessMetadata;

  /**
   * @generated from field: optional int64 total_frames = 4;
   */
  totalFrames: bigint;

  /**
   * @generated from field: optional int64 missed_frames = 5;
   */
  missedFrames: bigint;

  /**
   * @generated from field: optional int64 missed_app_frames = 6;
   */
  missedAppFrames: bigint;

  /**
   * @generated from field: optional int64 missed_sf_frames = 7;
   */
  missedSfFrames: bigint;

  /**
   * @generated from field: optional int64 frame_dur_max = 8;
   */
  frameDurMax: bigint;

  /**
   * @generated from field: optional int64 frame_dur_avg = 9;
   */
  frameDurAvg: bigint;

  /**
   * @generated from field: optional int64 frame_dur_p50 = 10;
   */
  frameDurP50: bigint;

  /**
   * @generated from field: optional int64 frame_dur_p90 = 11;
   */
  frameDurP90: bigint;

  /**
   * @generated from field: optional int64 frame_dur_p95 = 12;
   */
  frameDurP95: bigint;

  /**
   * @generated from field: optional int64 frame_dur_p99 = 13;
   */
  frameDurP99: bigint;

  /**
   * @generated from field: optional double frame_dur_ms_p50 = 14;
   */
  frameDurMsP50: number;

  /**
   * @generated from field: optional double frame_dur_ms_p90 = 15;
   */
  frameDurMsP90: number;

  /**
   * @generated from field: optional double frame_dur_ms_p95 = 16;
   */
  frameDurMsP95: number;

  /**
   * @generated from field: optional double frame_dur_ms_p99 = 17;
   */
  frameDurMsP99: number;

  /**
   * @generated from field: optional int64 dropped_frames = 18;
   */
  droppedFrames: bigint;

  /**
   * Metrics for each jank type in this process
   *
   * @generated from field: repeated perfetto.protos.AndroidFrameTimelineMetric.JankTypeMetric jank_types = 19;
   */
  jankTypes: AndroidFrameTimelineMetric_JankTypeMetric[];
};

/**
 * Describes the message perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown.
 * Use `create(AndroidFrameTimelineMetric_ProcessBreakdownSchema)` to create a new message.
 */
export const AndroidFrameTimelineMetric_ProcessBreakdownSchema: GenMessage<AndroidFrameTimelineMetric_ProcessBreakdown> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_metrics_android_android_frame_timeline_metric, 0, 1);

