[v9.3.x] Prometheus: Exemplar optimization (#60057)
replace inefficient forEach
(cherry picked from commit e85763065c)
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
This commit is contained in:
co-authored by
Galen Kistler
parent
d53f59f0bf
commit
6e078879ce
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user