//
// Copyright (C) 2021 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/dma_heap_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/dma_heap_metric.proto.
 */
export const file_protos_perfetto_metrics_android_dma_heap_metric: GenFile = /*@__PURE__*/
  fileDesc("CjVwcm90b3MvcGVyZmV0dG8vbWV0cmljcy9hbmRyb2lkL2RtYV9oZWFwX21ldHJpYy5wcm90bxIPcGVyZmV0dG8ucHJvdG9zIp8CChRBbmRyb2lkRG1hSGVhcE1ldHJpYxIWCg5hdmdfc2l6ZV9ieXRlcxgBIAEoARIWCg5taW5fc2l6ZV9ieXRlcxgCIAEoARIWCg5tYXhfc2l6ZV9ieXRlcxgDIAEoARIeChZ0b3RhbF9hbGxvY19zaXplX2J5dGVzGAQgASgBEhkKEXRvdGFsX2RlbHRhX2J5dGVzGAUgASgFEkkKDXByb2Nlc3Nfc3RhdHMYBiADKAsyMi5wZXJmZXR0by5wcm90b3MuQW5kcm9pZERtYUhlYXBNZXRyaWMuUHJvY2Vzc1N0YXRzGjkKDFByb2Nlc3NTdGF0cxIUCgxwcm9jZXNzX25hbWUYASABKAkSEwoLZGVsdGFfYnl0ZXMYAiABKAU");

/**
 * dma-buf heap memory stats on Android.
 *
 * @generated from message perfetto.protos.AndroidDmaHeapMetric
 */
export type AndroidDmaHeapMetric = Message<"perfetto.protos.AndroidDmaHeapMetric"> & {
  /**
   * @generated from field: optional double avg_size_bytes = 1;
   */
  avgSizeBytes: number;

  /**
   * @generated from field: optional double min_size_bytes = 2;
   */
  minSizeBytes: number;

  /**
   * @generated from field: optional double max_size_bytes = 3;
   */
  maxSizeBytes: number;

  /**
   * Total allocation size.
   * Essentially the sum of positive allocs.
   *
   * @generated from field: optional double total_alloc_size_bytes = 4;
   */
  totalAllocSizeBytes: number;

  /**
   * Total delta size (bytes allocated but not freed during the trace)
   *
   * @generated from field: optional int32 total_delta_bytes = 5;
   */
  totalDeltaBytes: number;

  /**
   * @generated from field: repeated perfetto.protos.AndroidDmaHeapMetric.ProcessStats process_stats = 6;
   */
  processStats: AndroidDmaHeapMetric_ProcessStats[];
};

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

/**
 * @generated from message perfetto.protos.AndroidDmaHeapMetric.ProcessStats
 */
export type AndroidDmaHeapMetric_ProcessStats = Message<"perfetto.protos.AndroidDmaHeapMetric.ProcessStats"> & {
  /**
   * process that either directly or indirectly allocated the buffers
   *
   * @generated from field: optional string process_name = 1;
   */
  processName: string;

  /**
   * Bytes allocated but not freed during this trace
   *
   * @generated from field: optional int32 delta_bytes = 2;
   */
  deltaBytes: number;
};

/**
 * Describes the message perfetto.protos.AndroidDmaHeapMetric.ProcessStats.
 * Use `create(AndroidDmaHeapMetric_ProcessStatsSchema)` to create a new message.
 */
export const AndroidDmaHeapMetric_ProcessStatsSchema: GenMessage<AndroidDmaHeapMetric_ProcessStats> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_metrics_android_dma_heap_metric, 0, 0);

