mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +02:00
Fix incorrect pluralization in reserved list metric name.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=150241148
This commit is contained in:
parent
f28104ad03
commit
e60c01c2f7
2 changed files with 11 additions and 11 deletions
|
@ -38,7 +38,7 @@ class DomainLabelMetrics {
|
|||
}
|
||||
|
||||
/**
|
||||
* Labels attached to {@link #reservedListChecks} and {@link #reservedListProcessingTimes}
|
||||
* Labels attached to {@link #reservedListChecks} and {@link #reservedListProcessingTime}
|
||||
* metrics.
|
||||
*
|
||||
* <p>A domain name can be matched by multiple reserved lists. To keep the metrics useful by
|
||||
|
@ -74,7 +74,7 @@ class DomainLabelMetrics {
|
|||
|
||||
/** Metric recording the amount of time required to check a label against all reserved lists. */
|
||||
@VisibleForTesting
|
||||
static final EventMetric reservedListProcessingTimes =
|
||||
static final EventMetric reservedListProcessingTime =
|
||||
MetricRegistryImpl.getDefault()
|
||||
.newEventMetric(
|
||||
"/domain_label/reserved/processing_time",
|
||||
|
@ -121,7 +121,7 @@ class DomainLabelMetrics {
|
|||
.toString();
|
||||
reservedListChecks.increment(
|
||||
tld, matchCount, mostSevereReservedList, mostSevereReservationType);
|
||||
reservedListProcessingTimes.record(
|
||||
reservedListProcessingTime.record(
|
||||
elapsedMillis, tld, matchCount, mostSevereReservedList, mostSevereReservationType);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ import static com.google.common.truth.Truth.assertThat;
|
|||
import static com.google.common.truth.Truth.assertWithMessage;
|
||||
import static google.registry.model.registry.label.DomainLabelMetrics.reservedListChecks;
|
||||
import static google.registry.model.registry.label.DomainLabelMetrics.reservedListHits;
|
||||
import static google.registry.model.registry.label.DomainLabelMetrics.reservedListProcessingTimes;
|
||||
import static google.registry.model.registry.label.DomainLabelMetrics.reservedListProcessingTime;
|
||||
import static google.registry.model.registry.label.ReservationType.ALLOWED_IN_SUNRISE;
|
||||
import static google.registry.model.registry.label.ReservationType.FULLY_BLOCKED;
|
||||
import static google.registry.model.registry.label.ReservationType.MISTAKEN_PREMIUM;
|
||||
|
@ -76,7 +76,7 @@ public class ReservedListTest {
|
|||
inject.setStaticField(Ofy.class, "clock", clock);
|
||||
createTld("tld");
|
||||
reservedListChecks.reset();
|
||||
reservedListProcessingTimes.reset();
|
||||
reservedListProcessingTime.reset();
|
||||
reservedListHits.reset();
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ public class ReservedListTest {
|
|||
.hasValueForLabels(unreservedCount, "tld", "0", "(none)", UNRESERVED.toString())
|
||||
.and()
|
||||
.hasNoOtherValues();
|
||||
assertThat(reservedListProcessingTimes)
|
||||
assertThat(reservedListProcessingTime)
|
||||
.hasAnyValueForLabels("tld", "0", "(none)", UNRESERVED.toString())
|
||||
.and()
|
||||
.hasNoOtherValues();
|
||||
|
@ -153,7 +153,7 @@ public class ReservedListTest {
|
|||
.hasValueForLabels(6, "tld", "1", "reserved1", RESERVED_FOR_ANCHOR_TENANT.toString())
|
||||
.and()
|
||||
.hasNoOtherValues();
|
||||
assertThat(reservedListProcessingTimes)
|
||||
assertThat(reservedListProcessingTime)
|
||||
.hasAnyValueForLabels("tld", "0", "(none)", UNRESERVED.toString())
|
||||
.and()
|
||||
.hasAnyValueForLabels("tld", "1", "reserved1", RESERVED_FOR_ANCHOR_TENANT.toString())
|
||||
|
@ -232,7 +232,7 @@ public class ReservedListTest {
|
|||
.hasValueForLabels(1, "tld", "0", "(none)", UNRESERVED.toString())
|
||||
.and()
|
||||
.hasNoOtherValues();
|
||||
assertThat(reservedListProcessingTimes)
|
||||
assertThat(reservedListProcessingTime)
|
||||
.hasAnyValueForLabels("tld", "1", "reserved2", FULLY_BLOCKED.toString())
|
||||
.and()
|
||||
.hasAnyValueForLabels("tld", "1", "reserved2", NAME_COLLISION.toString())
|
||||
|
@ -301,7 +301,7 @@ public class ReservedListTest {
|
|||
.hasValueForLabels(2, "tld", "1", "reserved2", FULLY_BLOCKED.toString())
|
||||
.and()
|
||||
.hasNoOtherValues();
|
||||
assertThat(reservedListProcessingTimes)
|
||||
assertThat(reservedListProcessingTime)
|
||||
.hasAnyValueForLabels("tld", "0", "(none)", UNRESERVED.toString())
|
||||
.and()
|
||||
.hasAnyValueForLabels("tld", "1", "reserved1", FULLY_BLOCKED.toString())
|
||||
|
@ -355,7 +355,7 @@ public class ReservedListTest {
|
|||
.hasValueForLabels(1, "tld", "0", "(none)", UNRESERVED.toString())
|
||||
.and()
|
||||
.hasNoOtherValues();
|
||||
assertThat(reservedListProcessingTimes)
|
||||
assertThat(reservedListProcessingTime)
|
||||
.hasAnyValueForLabels("tld", "1", "reserved2", FULLY_BLOCKED.toString())
|
||||
.and()
|
||||
.hasAnyValueForLabels("tld", "0", "(none)", UNRESERVED.toString())
|
||||
|
@ -382,7 +382,7 @@ public class ReservedListTest {
|
|||
.hasValueForLabels(1, "tld", "2", "reserved2", FULLY_BLOCKED.toString())
|
||||
.and()
|
||||
.hasNoOtherValues();
|
||||
assertThat(reservedListProcessingTimes)
|
||||
assertThat(reservedListProcessingTime)
|
||||
.hasAnyValueForLabels("tld", "1", "reserved1", ALLOWED_IN_SUNRISE.toString())
|
||||
.and()
|
||||
.hasAnyValueForLabels("tld", "2", "reserved2", FULLY_BLOCKED.toString())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue