Skip to content

Commit

Permalink
Simple MetricsSnapshot performance change
Browse files Browse the repository at this point in the history
Signed-off-by: dhoard <doug.hoard@gmail.com>
  • Loading branch information
dhoard authored and fstab committed May 23, 2024
1 parent fa5e057 commit 5867b79
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ private Builder() {
}

public boolean containsMetricName(String name) {
if (name == null) {
return false;
}
String prometheusName = prometheusName(name);
for (MetricSnapshot snapshot : snapshots) {
if (snapshot.getMetadata().getPrometheusName().equals(prometheusName(name))) {
if (snapshot.getMetadata().getPrometheusName().equals(prometheusName)) {
return true;
}
}
Expand Down

0 comments on commit 5867b79

Please sign in to comment.