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:
Kubernetes Prow Robot 2022-05-05 11:53:45 -07:00 committed by GitHub
commit 71df3e819b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}