//
// Copyright (C) 2024 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/wattson_tasks_attribution.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/wattson_tasks_attribution.proto.
 */
export const file_protos_perfetto_metrics_android_wattson_tasks_attribution: GenFile = /*@__PURE__*/
  fileDesc("Cj9wcm90b3MvcGVyZmV0dG8vbWV0cmljcy9hbmRyb2lkL3dhdHRzb25fdGFza3NfYXR0cmlidXRpb24ucHJvdG8SD3BlcmZldHRvLnByb3RvcyKfAQokQW5kcm9pZFdhdHRzb25UYXNrc0F0dHJpYnV0aW9uTWV0cmljEhYKDm1ldHJpY192ZXJzaW9uGAEgASgFEhsKE3Bvd2VyX21vZGVsX3ZlcnNpb24YAiABKAUSQgoLcGVyaW9kX2luZm8YAyADKAsyLS5wZXJmZXR0by5wcm90b3MuQW5kcm9pZFdhdHRzb25UYXNrUGVyaW9kSW5mbyJtChxBbmRyb2lkV2F0dHNvblRhc2tQZXJpb2RJbmZvEhEKCXBlcmlvZF9pZBgBIAEoBRI6Cgl0YXNrX2luZm8YAiADKAsyJy5wZXJmZXR0by5wcm90b3MuQW5kcm9pZFdhdHRzb25UYXNrSW5mbyLLAQoWQW5kcm9pZFdhdHRzb25UYXNrSW5mbxIUCgxlc3RpbWF0ZWRfbXcYASABKAISFQoNZXN0aW1hdGVkX213cxgCIAEoAhIcChRpZGxlX3RyYW5zaXRpb25zX213cxgDIAEoAhITCgt0aHJlYWRfbmFtZRgEIAEoCRIUCgxwcm9jZXNzX25hbWUYBSABKAkSFAoMcGFja2FnZV9uYW1lGAYgASgJEhEKCXRocmVhZF9pZBgHIAEoBRISCgpwcm9jZXNzX2lkGAggASgF");

/**
 * @generated from message perfetto.protos.AndroidWattsonTasksAttributionMetric
 */
export type AndroidWattsonTasksAttributionMetric = Message<"perfetto.protos.AndroidWattsonTasksAttributionMetric"> & {
  /**
   * Each version increment means updated structure format or field
   *
   * @generated from field: optional int32 metric_version = 1;
   */
  metricVersion: number;

  /**
   * Each version increment means power model has been updated and estimates
   * might change for the exact same input. Don't compare estimates across
   * different power model versions.
   *
   * @generated from field: optional int32 power_model_version = 2;
   */
  powerModelVersion: number;

  /**
   * Lists tasks (e.g. threads, process, package) and associated estimates
   *
   * @generated from field: repeated perfetto.protos.AndroidWattsonTaskPeriodInfo period_info = 3;
   */
  periodInfo: AndroidWattsonTaskPeriodInfo[];
};

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

/**
 * Groups of power per task for each period
 *
 * @generated from message perfetto.protos.AndroidWattsonTaskPeriodInfo
 */
export type AndroidWattsonTaskPeriodInfo = Message<"perfetto.protos.AndroidWattsonTaskPeriodInfo"> & {
  /**
   * @generated from field: optional int32 period_id = 1;
   */
  periodId: number;

  /**
   * @generated from field: repeated perfetto.protos.AndroidWattsonTaskInfo task_info = 2;
   */
  taskInfo: AndroidWattsonTaskInfo[];
};

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

/**
 * @generated from message perfetto.protos.AndroidWattsonTaskInfo
 */
export type AndroidWattsonTaskInfo = Message<"perfetto.protos.AndroidWattsonTaskInfo"> & {
  /**
   * Average estimated power for wall duration in mW
   *
   * @generated from field: optional float estimated_mw = 1;
   */
  estimatedMw: number;

  /**
   * Total energy over wall duration across CPUs in mWs
   *
   * @generated from field: optional float estimated_mws = 2;
   */
  estimatedMws: number;

  /**
   * Energy attributed to a thread for causing CPU idle exit
   *
   * @generated from field: optional float idle_transitions_mws = 3;
   */
  idleTransitionsMws: number;

  /**
   * @generated from field: optional string thread_name = 4;
   */
  threadName: string;

  /**
   * @generated from field: optional string process_name = 5;
   */
  processName: string;

  /**
   * @generated from field: optional string package_name = 6;
   */
  packageName: string;

  /**
   * @generated from field: optional int32 thread_id = 7;
   */
  threadId: number;

  /**
   * @generated from field: optional int32 process_id = 8;
   */
  processId: number;
};

/**
 * Describes the message perfetto.protos.AndroidWattsonTaskInfo.
 * Use `create(AndroidWattsonTaskInfoSchema)` to create a new message.
 */
export const AndroidWattsonTaskInfoSchema: GenMessage<AndroidWattsonTaskInfo> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_metrics_android_wattson_tasks_attribution, 2);

