# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: org/apache/texera/amber/engine/architecture/worker/statistics.proto
# plugin: python-betterproto
# This file has been @generated

from dataclasses import dataclass
from typing import (
    List,
)

import betterproto

from .... import core as ___core__


class WorkerState(betterproto.Enum):
    UNINITIALIZED = 0
    READY = 1
    RUNNING = 2
    PAUSED = 3
    COMPLETED = 4
    TERMINATED = 5


@dataclass(eq=False, repr=False)
class PortTupleMetricsMapping(betterproto.Message):
    port_id: "___core__.PortIdentity" = betterproto.message_field(1)
    tuple_metrics: "TupleMetrics" = betterproto.message_field(2)


@dataclass(eq=False, repr=False)
class TupleMetrics(betterproto.Message):
    count: int = betterproto.int64_field(1)
    size: int = betterproto.int64_field(2)


@dataclass(eq=False, repr=False)
class WorkerStatistics(betterproto.Message):
    input_tuple_metrics: List["PortTupleMetricsMapping"] = betterproto.message_field(1)
    output_tuple_metrics: List["PortTupleMetricsMapping"] = betterproto.message_field(2)
    data_processing_time: int = betterproto.int64_field(3)
    control_processing_time: int = betterproto.int64_field(4)
    idle_time: int = betterproto.int64_field(5)


@dataclass(eq=False, repr=False)
class WorkerMetrics(betterproto.Message):
    worker_state: "WorkerState" = betterproto.enum_field(1)
    worker_statistics: "WorkerStatistics" = betterproto.message_field(2)
