mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-02-11 13:31:45 +01:00
add isNan to clusterMetric aggregation
This commit is contained in:
@@ -928,7 +928,11 @@ func (r *queryResolver) ClusterMetrics(ctx context.Context, cluster string, metr
|
||||
// Sum if init'd and matching size
|
||||
if okData && len(ser.Data) == len(collectorData[metric]) {
|
||||
for i, val := range ser.Data {
|
||||
collectorData[metric][i] += val
|
||||
if val.IsNaN() {
|
||||
continue
|
||||
} else {
|
||||
collectorData[metric][i] += val
|
||||
}
|
||||
}
|
||||
} else if okData {
|
||||
cclog.Debugf("ClusterMetrics Skip Sum: Data Diff -> %s at %s; Want Size %d, Have Size %d", metric, ser.Hostname, len(collectorData[metric]), len(ser.Data))
|
||||
|
||||
Reference in New Issue
Block a user