mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #109545 from sanposhiho/fix-nun-on-scheduler_perf
Skip adding data to avoid "json: unsupported value: NaN" panic when data is NaN
This commit is contained in:
commit
71df3e819b
@ -243,7 +243,12 @@ func collectHistogramVec(metric string, labels map[string]string, lvMap map[stri
|
||||
}
|
||||
|
||||
if err := vec.Validate(); err != nil {
|
||||
klog.Error(err)
|
||||
klog.ErrorS(err, "the validation for HistogramVec is failed. The data for this metric won't be stored in a benchmark result file", "metric", metric, "labels", labels)
|
||||
return nil
|
||||
}
|
||||
|
||||
if vec.GetAggregatedSampleCount() == 0 {
|
||||
klog.InfoS("It is expected that this metric wasn't recorded. The data for this metric won't be stored in a benchmark result file", "metric", metric, "labels", labels)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user