22
33from enum import IntEnum , StrEnum
44
5+ # --------------------------------------------------------
6+ # CONSTANTS FOR THE REQUESTS GENERATOR
7+ # --------------------------------------------------------
58
69class TimeDefaults (IntEnum ):
710 """Default time-related constants (all in seconds)."""
@@ -20,4 +23,45 @@ class Distribution(StrEnum):
2023 POISSON = "poisson"
2124 NORMAL = "normal"
2225
26+ # --------------------------------------------------------
27+ # CONSTANTS FOR THE REQUESTS ENDPOINT STRUCTURE IN THE
28+ # REQUESTS HANDLER
29+ # --------------------------------------------------------
30+
31+ # Idea here is to create an ordered nested dict with
32+ # this structure: {endpoint_name: {
33+ # operation_type:
34+ # latency (s)/ram (kb): value}}
35+ # we need Enum to have a better control on the dict keys in the
36+ # pydantic schema
37+
38+ class EndpointIO (StrEnum ):
39+ """Name of I/O operations"""
40+
41+ IO_WITH_CHILD = "io_new_coroutine" #Child task exit
42+ IO_LLM_BOUND = "io_llm" # Llm speicif task
43+ IO_SLEEP = "i/o_bound" # No child task
44+
45+
46+ class EndpointCPU (StrEnum ):
47+ """Name of CPU bound operations"""
48+
49+ INITIAL_PARSING = "initial_parsing"
50+ CPU_BOUND_OPERATION = "cpu_bound_operation"
51+
52+
53+ class EndpointRAM (StrEnum ):
54+ """Name of the operation to add ram"""
55+
56+ RAM = "ram"
57+
58+
59+ class MetricKeys (StrEnum ):
60+ """
61+ Name of the key to quantify the operation
62+ in terms of Ram or latency
63+ """
64+
65+ LATENCY = "latency"
66+ NECESSARY_RAM = "necessary_ram"
2367
0 commit comments