Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnheider committed May 28, 2024
1 parent ac72f1e commit 1fe78ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions heimdallr/entry_points/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@
dash_bootstrap_components.themes.DARKLY,
]

logger = logging.getLogger(__name__)

GPU_STATS = NOD()
DU_STATS = NOD()
KEEP_ALIVE = NOD()
Expand Down Expand Up @@ -198,6 +200,7 @@ def update_table(n: int) -> Div:

if GPU_STATS:
df = to_overall_gpu_process_df(GPU_STATS.as_dict())

else:
df = DataFrame(["No data"], columns=("data",))

Expand Down Expand Up @@ -277,6 +280,7 @@ def menu_toggle(n_clicks: int) -> dict:
"""
if n_clicks and n_clicks % 2 == 1:
return {"display": "block"}

return {"display": "none"}


Expand Down Expand Up @@ -313,6 +317,7 @@ def on_message(client: Any, userdata: Any, result: mqtt.client.MQTTMessage) -> N
if "gpu_stats" in d[key]:
GPU_STATS[key] = d[key]["gpu_stats"]
DU_STATS[key] = d[key]["du_stats"]

else:
GPU_STATS[key] = d[key] # ["gpu_stats"]
DU_STATS[key] = {}
Expand Down

0 comments on commit 1fe78ea

Please sign in to comment.