//
// Copyright (C) 2019 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/java_heap_stats.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/java_heap_stats.proto.
 */
export const file_protos_perfetto_metrics_android_java_heap_stats: GenFile = /*@__PURE__*/
  fileDesc("CjVwcm90b3MvcGVyZmV0dG8vbWV0cmljcy9hbmRyb2lkL2phdmFfaGVhcF9zdGF0cy5wcm90bxIPcGVyZmV0dG8ucHJvdG9zIu0ECg1KYXZhSGVhcFN0YXRzEkQKDmluc3RhbmNlX3N0YXRzGAEgAygLMiwucGVyZmV0dG8ucHJvdG9zLkphdmFIZWFwU3RhdHMuSW5zdGFuY2VTdGF0cxpECglIZWFwUm9vdHMSEQoJcm9vdF90eXBlGAEgASgJEhEKCXR5cGVfbmFtZRgCIAEoCRIRCglvYmpfY291bnQYAyABKAMavQIKBlNhbXBsZRIKCgJ0cxgBIAEoAxIRCgloZWFwX3NpemUYAiABKAMSGAoQaGVhcF9uYXRpdmVfc2l6ZRgIIAEoAxIRCglvYmpfY291bnQYBCABKAMSGwoTcmVhY2hhYmxlX2hlYXBfc2l6ZRgDIAEoAxIiChpyZWFjaGFibGVfaGVhcF9uYXRpdmVfc2l6ZRgJIAEoAxIbChNyZWFjaGFibGVfb2JqX2NvdW50GAUgASgDEh4KFmFub25fcnNzX2FuZF9zd2FwX3NpemUYBiABKAMSNwoFcm9vdHMYByADKAsyKC5wZXJmZXR0by5wcm90b3MuSmF2YUhlYXBTdGF0cy5IZWFwUm9vdHMSFQoNb29tX3Njb3JlX2FkahgKIAEoAxIZChFwcm9jZXNzX3VwdGltZV9tcxgLIAEoAxqPAQoNSW5zdGFuY2VTdGF0cxIMCgR1cGlkGAEgASgNEjgKB3Byb2Nlc3MYAiABKAsyJy5wZXJmZXR0by5wcm90b3MuQW5kcm9pZFByb2Nlc3NNZXRhZGF0YRI2CgdzYW1wbGVzGAMgAygLMiUucGVyZmV0dG8ucHJvdG9zLkphdmFIZWFwU3RhdHMuU2FtcGxl", [file_protos_perfetto_metrics_android_process_metadata]);

/**
 * @generated from message perfetto.protos.JavaHeapStats
 */
export type JavaHeapStats = Message<"perfetto.protos.JavaHeapStats"> & {
  /**
   * @generated from field: repeated perfetto.protos.JavaHeapStats.InstanceStats instance_stats = 1;
   */
  instanceStats: JavaHeapStats_InstanceStats[];
};

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

/**
 * @generated from message perfetto.protos.JavaHeapStats.HeapRoots
 */
export type JavaHeapStats_HeapRoots = Message<"perfetto.protos.JavaHeapStats.HeapRoots"> & {
  /**
   * @generated from field: optional string root_type = 1;
   */
  rootType: string;

  /**
   * @generated from field: optional string type_name = 2;
   */
  typeName: string;

  /**
   * @generated from field: optional int64 obj_count = 3;
   */
  objCount: bigint;
};

/**
 * Describes the message perfetto.protos.JavaHeapStats.HeapRoots.
 * Use `create(JavaHeapStats_HeapRootsSchema)` to create a new message.
 */
export const JavaHeapStats_HeapRootsSchema: GenMessage<JavaHeapStats_HeapRoots> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_metrics_android_java_heap_stats, 0, 0);

/**
 * Next id: 12
 *
 * @generated from message perfetto.protos.JavaHeapStats.Sample
 */
export type JavaHeapStats_Sample = Message<"perfetto.protos.JavaHeapStats.Sample"> & {
  /**
   * @generated from field: optional int64 ts = 1;
   */
  ts: bigint;

  /**
   * Size of the Java heap in bytes
   *
   * @generated from field: optional int64 heap_size = 2;
   */
  heapSize: bigint;

  /**
   * Native size of all the objects (not included in heap_size)
   *
   * @generated from field: optional int64 heap_native_size = 8;
   */
  heapNativeSize: bigint;

  /**
   * @generated from field: optional int64 obj_count = 4;
   */
  objCount: bigint;

  /**
   * Size of the reachable objects in bytes.
   *
   * @generated from field: optional int64 reachable_heap_size = 3;
   */
  reachableHeapSize: bigint;

  /**
   * Native size of all the reachable objects (not included in
   * reachable_heap_size)
   *
   * @generated from field: optional int64 reachable_heap_native_size = 9;
   */
  reachableHeapNativeSize: bigint;

  /**
   * @generated from field: optional int64 reachable_obj_count = 5;
   */
  reachableObjCount: bigint;

  /**
   * Sum of anonymous RSS + swap pages in bytes.
   *
   * @generated from field: optional int64 anon_rss_and_swap_size = 6;
   */
  anonRssAndSwapSize: bigint;

  /**
   * ART root objects
   *
   * @generated from field: repeated perfetto.protos.JavaHeapStats.HeapRoots roots = 7;
   */
  roots: JavaHeapStats_HeapRoots[];

  /**
   * OOM adjustment score
   *
   * @generated from field: optional int64 oom_score_adj = 10;
   */
  oomScoreAdj: bigint;

  /**
   * Process uptime in millis at the time of the heap dump
   *
   * @generated from field: optional int64 process_uptime_ms = 11;
   */
  processUptimeMs: bigint;
};

/**
 * Describes the message perfetto.protos.JavaHeapStats.Sample.
 * Use `create(JavaHeapStats_SampleSchema)` to create a new message.
 */
export const JavaHeapStats_SampleSchema: GenMessage<JavaHeapStats_Sample> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_metrics_android_java_heap_stats, 0, 1);

/**
 * Heap stats per process. One sample per dump (can be > 1 if continuous
 * dump is enabled).
 *
 * @generated from message perfetto.protos.JavaHeapStats.InstanceStats
 */
export type JavaHeapStats_InstanceStats = Message<"perfetto.protos.JavaHeapStats.InstanceStats"> & {
  /**
   * @generated from field: optional uint32 upid = 1;
   */
  upid: number;

  /**
   * @generated from field: optional perfetto.protos.AndroidProcessMetadata process = 2;
   */
  process?: AndroidProcessMetadata;

  /**
   * @generated from field: repeated perfetto.protos.JavaHeapStats.Sample samples = 3;
   */
  samples: JavaHeapStats_Sample[];
};

/**
 * Describes the message perfetto.protos.JavaHeapStats.InstanceStats.
 * Use `create(JavaHeapStats_InstanceStatsSchema)` to create a new message.
 */
export const JavaHeapStats_InstanceStatsSchema: GenMessage<JavaHeapStats_InstanceStats> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_metrics_android_java_heap_stats, 0, 2);

