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

// @generated by protoc-gen-es v2.2.2 with parameter "target=ts"
// @generated from file protos/perfetto/metrics/android/hwui_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 { Message } from "@bufbuild/protobuf";

/**
 * Describes the file protos/perfetto/metrics/android/hwui_metric.proto.
 */
export const file_protos_perfetto_metrics_android_hwui_metric: GenFile = /*@__PURE__*/
  fileDesc("CjFwcm90b3MvcGVyZmV0dG8vbWV0cmljcy9hbmRyb2lkL2h3dWlfbWV0cmljLnByb3RvEg9wZXJmZXR0by5wcm90b3Mi0wgKEVByb2Nlc3NSZW5kZXJJbmZvEhQKDHByb2Nlc3NfbmFtZRgBIAEoCRIWCg5ydF9jcHVfdGltZV9tcxgCIAEoAxIYChBkcmF3X2ZyYW1lX2NvdW50GAMgASgNEhYKDmRyYXdfZnJhbWVfbWF4GAQgASgDEhYKDmRyYXdfZnJhbWVfbWluGAUgASgDEhYKDmRyYXdfZnJhbWVfYXZnGAYgASgBEhMKC2ZsdXNoX2NvdW50GAcgASgNEhEKCWZsdXNoX21heBgIIAEoAxIRCglmbHVzaF9taW4YCSABKAMSEQoJZmx1c2hfYXZnGAogASgBEhoKEnByZXBhcmVfdHJlZV9jb3VudBgLIAEoDRIYChBwcmVwYXJlX3RyZWVfbWF4GAwgASgDEhgKEHByZXBhcmVfdHJlZV9taW4YDSABKAMSGAoQcHJlcGFyZV90cmVlX2F2ZxgOIAEoARIcChRncHVf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NSZW5kZXJJbmZv");

/**
 * Android HWUI graphics performance and graphics memory usage metrics.
 *
 * @generated from message perfetto.protos.ProcessRenderInfo
 */
export type ProcessRenderInfo = Message<"perfetto.protos.ProcessRenderInfo"> & {
  /**
   * Name of the package launched
   *
   * @generated from field: optional string process_name = 1;
   */
  processName: string;

  /**
   * CPU time spent on RenderThread in milliseconds.
   *
   * @generated from field: optional int64 rt_cpu_time_ms = 2;
   */
  rtCpuTimeMs: bigint;

  /**
   * Number of frames drawn on RenderThread, followed by max/min/avg CPU time to draw a frame
   * in nanoseconds.
   *
   * @generated from field: optional uint32 draw_frame_count = 3;
   */
  drawFrameCount: number;

  /**
   * @generated from field: optional int64 draw_frame_max = 4;
   */
  drawFrameMax: bigint;

  /**
   * @generated from field: optional int64 draw_frame_min = 5;
   */
  drawFrameMin: bigint;

  /**
   * @generated from field: optional double draw_frame_avg = 6;
   */
  drawFrameAvg: number;

  /**
   * Number of GPU commands flushes and max/min/avg time per flush in nanoseconds.
   *
   * @generated from field: optional uint32 flush_count = 7;
   */
  flushCount: number;

  /**
   * @generated from field: optional int64 flush_max = 8;
   */
  flushMax: bigint;

  /**
   * @generated from field: optional int64 flush_min = 9;
   */
  flushMin: bigint;

  /**
   * @generated from field: optional double flush_avg = 10;
   */
  flushAvg: number;

  /**
   * Number of View tree preparation counts and max/min/avg time to traverse the tree in
   * nanoseconds.
   *
   * @generated from field: optional uint32 prepare_tree_count = 11;
   */
  prepareTreeCount: number;

  /**
   * @generated from field: optional int64 prepare_tree_max = 12;
   */
  prepareTreeMax: bigint;

  /**
   * @generated from field: optional int64 prepare_tree_min = 13;
   */
  prepareTreeMin: bigint;

  /**
   * @generated from field: optional double prepare_tree_avg = 14;
   */
  prepareTreeAvg: number;

  /**
   * Number of times the GPU rendered a frame and max/min/avg time for GPU to finish rendering in
   * in nanoseconds.
   *
   * @generated from field: optional uint32 gpu_completion_count = 15;
   */
  gpuCompletionCount: number;

  /**
   * @generated from field: optional int64 gpu_completion_max = 16;
   */
  gpuCompletionMax: bigint;

  /**
   * @generated from field: optional int64 gpu_completion_min = 17;
   */
  gpuCompletionMin: bigint;

  /**
   * @generated from field: optional double gpu_completion_avg = 18;
   */
  gpuCompletionAvg: number;

  /**
   * Number of times a frame was recorded/serialized in a display list on the UI thread with
   * max/min/avg time in nanoseconds.
   *
   * @generated from field: optional uint32 ui_record_count = 19;
   */
  uiRecordCount: number;

  /**
   * @generated from field: optional int64 ui_record_max = 20;
   */
  uiRecordMax: bigint;

  /**
   * @generated from field: optional int64 ui_record_min = 21;
   */
  uiRecordMin: bigint;

  /**
   * @generated from field: optional double ui_record_avg = 22;
   */
  uiRecordAvg: number;

  /**
   * number of unique shader programs that were used to render frames, followed by total and average
   * times to prepare a shader in nanoseconds.
   *
   * @generated from field: optional uint32 shader_compile_count = 23;
   */
  shaderCompileCount: number;

  /**
   * @generated from field: optional int64 shader_compile_time = 24;
   */
  shaderCompileTime: bigint;

  /**
   * @generated from field: optional double shader_compile_avg = 25;
   */
  shaderCompileAvg: number;

  /**
   * number of shader programs loaded from the disk cache, followed by total time and average time
   * to prepare a shader in nanoseconds.
   *
   * @generated from field: optional uint32 cache_hit_count = 26;
   */
  cacheHitCount: number;

  /**
   * @generated from field: optional int64 cache_hit_time = 27;
   */
  cacheHitTime: bigint;

  /**
   * @generated from field: optional double cache_hit_avg = 28;
   */
  cacheHitAvg: number;

  /**
   * number of shader programs compiled/linked, followed by total time and average time to prepare
   * a shader in nanoseconds.
   *
   * @generated from field: optional uint32 cache_miss_count = 29;
   */
  cacheMissCount: number;

  /**
   * @generated from field: optional int64 cache_miss_time = 30;
   */
  cacheMissTime: bigint;

  /**
   * @generated from field: optional double cache_miss_avg = 31;
   */
  cacheMissAvg: number;

  /**
   * max/min/avg CPU memory used for graphics by HWUI at the end of a frame.
   *
   * @generated from field: optional int64 graphics_cpu_mem_max = 32;
   */
  graphicsCpuMemMax: bigint;

  /**
   * @generated from field: optional int64 graphics_cpu_mem_min = 33;
   */
  graphicsCpuMemMin: bigint;

  /**
   * @generated from field: optional double graphics_cpu_mem_avg = 34;
   */
  graphicsCpuMemAvg: number;

  /**
   * max/min/avg GPU memory used by HWUI at the end of a frame excluding textures.
   *
   * @generated from field: optional int64 graphics_gpu_mem_max = 35;
   */
  graphicsGpuMemMax: bigint;

  /**
   * @generated from field: optional int64 graphics_gpu_mem_min = 36;
   */
  graphicsGpuMemMin: bigint;

  /**
   * @generated from field: optional double graphics_gpu_mem_avg = 37;
   */
  graphicsGpuMemAvg: number;

  /**
   * max/min/avg memory used for GPU textures by HWUI at the end of a frame.
   *
   * @generated from field: optional int64 texture_mem_max = 38;
   */
  textureMemMax: bigint;

  /**
   * @generated from field: optional int64 texture_mem_min = 39;
   */
  textureMemMin: bigint;

  /**
   * @generated from field: optional double texture_mem_avg = 40;
   */
  textureMemAvg: number;

  /**
   * max/min/avg memory used by HWUI at the end of a frame. This is a sum of previous 3 categories.
   *
   * @generated from field: optional int64 all_mem_max = 41;
   */
  allMemMax: bigint;

  /**
   * @generated from field: optional int64 all_mem_min = 42;
   */
  allMemMin: bigint;

  /**
   * @generated from field: optional double all_mem_avg = 43;
   */
  allMemAvg: number;
};

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

/**
 * @generated from message perfetto.protos.AndroidHwuiMetric
 */
export type AndroidHwuiMetric = Message<"perfetto.protos.AndroidHwuiMetric"> & {
  /**
   *  HWUI metrics for processes that have a RenderThread.
   *
   * @generated from field: repeated perfetto.protos.ProcessRenderInfo process_info = 1;
   */
  processInfo: ProcessRenderInfo[];
};

/**
 * Describes the message perfetto.protos.AndroidHwuiMetric.
 * Use `create(AndroidHwuiMetricSchema)` to create a new message.
 */
export const AndroidHwuiMetricSchema: GenMessage<AndroidHwuiMetric> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_metrics_android_hwui_metric, 1);

