Skip to content

Commit 1a1eaeb

Browse files
author
Chris Hunter
committed
network/infiniband - convert counter to float value to match gmetric unit
1 parent 690dd19 commit 1a1eaeb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

network/infiniband/python_modules/infiniband.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,13 +432,13 @@ def process_metric_value(metric_name, counter_value):
432432
delta = 0.0
433433
last_value = 0.0
434434
try:
435-
last_value = LAST_METRICS[metric_name]
435+
last_value = float(LAST_METRICS[metric_name])
436436

437437
# If a counter reset occurred previously, we could go negative
438438
if last_value > counter_value:
439439
delta = counter_value
440440
else:
441-
delta = counter_value - last_value
441+
delta = float(counter_value - last_value)
442442

443443
except KeyError:
444444
# If LAST_METRICS has no value, this is our first time updating.

0 commit comments

Comments
 (0)