feat: Add GPU ID to temperatures

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2022-05-14 11:30:39 +02:00
parent 98483e3279
commit 6f09301879
No known key found for this signature in database
GPG key ID: FF42D23B580C89F7

View file

@ -235,7 +235,7 @@ class Trex(Resource):
temperature = gpu["temperature"]
logger.debug(f"Temperature of {name} ({id}) is {temperature}C")
metrics.append(
Metric("temperature", temperature, context="temperature")
Metric(f"temperature_{id}", temperature, context="temperature")
)
if "memory_temperature" in gpu:
@ -245,7 +245,7 @@ class Trex(Resource):
)
metrics.append(
Metric(
"memory_temperature",
f"memory_temperature_{id}",
memory_temperature,
context="memory_temperature",
)