Loading druid_ingests/cooling-sim-cdu.json +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ "dimensionsSpec": { "dimensions": [ "sim_id", "xname", "name", { "type": "long", "name": "row" Loading simulation_server/models/output.py +2 −3 Original line number Diff line number Diff line Loading @@ -134,10 +134,9 @@ class SchedulerSimSystem(BaseModel): class CoolingSimCDU(BaseModel): timestamp: AwareDatetime xname: Optional[str] = None name: Optional[str] = None """ Unique identifier for the CDU of the (simulated) measurement, e.g. x2007c1. The CDU xname is the xname of the neighboring cabinet. """ row: Optional[int] = None """ Row index of the CDU """ Loading Loading @@ -168,7 +167,7 @@ class CoolingSimCDU(BaseModel): COOLING_CDU_API_FIELDS = { "xname": 'string', "name": 'string', "row": 'number', "col": 'number', "rack_1_power": 'number', Loading simulation_server/models/sim.py +1 −1 Original line number Diff line number Diff line Loading @@ -139,7 +139,7 @@ class SchedulerSimConfig(BaseModel): """ enabled: bool = False down_nodes: list[int] = [] # List of hostnames. TODO: allow parsing from xnames/hostname or int maybe? down_nodes: list[int] = [] # List of hostnames. TODO: allow parsing from xnames jobs_mode: Literal['replay', 'custom', 'random', 'test'] = 'random' schedule_policy: Literal['fcfs', 'sjf', 'prq'] ='fcfs' Loading simulation_server/server/orm.py +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ cooling_sim_cdu = Table( metadata, Column("__time", TIMESTAMP), Column("sim_id", String), Column("xname", String), Column("name", String), Column("row", Integer), Column("col", Integer), Column("rack_1_power", Double), Loading simulation_server/server/service.py +2 −2 Original line number Diff line number Diff line Loading @@ -416,12 +416,12 @@ def build_cooling_sim_cdu_query(*, tbl = orm.cooling_sim_cdu.alias("cdus") filter_cols = {c: tbl.c[c] for c in COOLING_CDU_API_FIELDS} group_cols = { "xname": tbl.c['xname'], "name": tbl.c['name'], } agg_cols: dict[str, sqla.sql.ColumnElement] = { **{ c: sqla.func.max(tbl.c[c]) for c in COOLING_CDU_API_FIELDS if c not in ['xname', 'row', 'col'] if c not in ['name', 'row', 'col'] }, **{c: sqla.func.any_value(tbl.c[c]) for c in ['row', 'col']}, } Loading Loading
druid_ingests/cooling-sim-cdu.json +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ "dimensionsSpec": { "dimensions": [ "sim_id", "xname", "name", { "type": "long", "name": "row" Loading
simulation_server/models/output.py +2 −3 Original line number Diff line number Diff line Loading @@ -134,10 +134,9 @@ class SchedulerSimSystem(BaseModel): class CoolingSimCDU(BaseModel): timestamp: AwareDatetime xname: Optional[str] = None name: Optional[str] = None """ Unique identifier for the CDU of the (simulated) measurement, e.g. x2007c1. The CDU xname is the xname of the neighboring cabinet. """ row: Optional[int] = None """ Row index of the CDU """ Loading Loading @@ -168,7 +167,7 @@ class CoolingSimCDU(BaseModel): COOLING_CDU_API_FIELDS = { "xname": 'string', "name": 'string', "row": 'number', "col": 'number', "rack_1_power": 'number', Loading
simulation_server/models/sim.py +1 −1 Original line number Diff line number Diff line Loading @@ -139,7 +139,7 @@ class SchedulerSimConfig(BaseModel): """ enabled: bool = False down_nodes: list[int] = [] # List of hostnames. TODO: allow parsing from xnames/hostname or int maybe? down_nodes: list[int] = [] # List of hostnames. TODO: allow parsing from xnames jobs_mode: Literal['replay', 'custom', 'random', 'test'] = 'random' schedule_policy: Literal['fcfs', 'sjf', 'prq'] ='fcfs' Loading
simulation_server/server/orm.py +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ cooling_sim_cdu = Table( metadata, Column("__time", TIMESTAMP), Column("sim_id", String), Column("xname", String), Column("name", String), Column("row", Integer), Column("col", Integer), Column("rack_1_power", Double), Loading
simulation_server/server/service.py +2 −2 Original line number Diff line number Diff line Loading @@ -416,12 +416,12 @@ def build_cooling_sim_cdu_query(*, tbl = orm.cooling_sim_cdu.alias("cdus") filter_cols = {c: tbl.c[c] for c in COOLING_CDU_API_FIELDS} group_cols = { "xname": tbl.c['xname'], "name": tbl.c['name'], } agg_cols: dict[str, sqla.sql.ColumnElement] = { **{ c: sqla.func.max(tbl.c[c]) for c in COOLING_CDU_API_FIELDS if c not in ['xname', 'row', 'col'] if c not in ['name', 'row', 'col'] }, **{c: sqla.func.any_value(tbl.c[c]) for c in ['row', 'col']}, } Loading