Prometheus: Exemplar optimization (#60055)

replace inefficient forEach
This commit is contained in:
Galen Kistler 2022-12-08 15:20:27 -06:00 committed by GitHub
parent dfc15163da
commit e85763065c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -181,7 +181,7 @@ const showExemplarMarker = (
if (visibleSeries.labels.length === visibleSeries.totalSeriesCount) {
showMarker = true;
} else {
visibleSeries.labels.forEach((visibleLabel) => {
visibleSeries.labels.some((visibleLabel) => {
// Get the label names
const labelKeys = Object.keys(visibleLabel.labels);
@ -204,6 +204,7 @@ const showExemplarMarker = (
});
}
}
return showMarker;
});
}
return showMarker;