mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 16:37:13 +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.
|
* metrics.
|
||||||
*
|
*
|
||||||
* <p>A domain name can be matched by multiple reserved lists. To keep the metrics useful by
|
* <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. */
|
/** Metric recording the amount of time required to check a label against all reserved lists. */
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
static final EventMetric reservedListProcessingTimes =
|
static final EventMetric reservedListProcessingTime =
|
||||||
MetricRegistryImpl.getDefault()
|
MetricRegistryImpl.getDefault()
|
||||||
.newEventMetric(
|
.newEventMetric(
|
||||||
"/domain_label/reserved/processing_time",
|
"/domain_label/reserved/processing_time",
|
||||||
|
@ -121,7 +121,7 @@ class DomainLabelMetrics {
|
||||||
.toString();
|
.toString();
|
||||||
reservedListChecks.increment(
|
reservedListChecks.increment(
|
||||||
tld, matchCount, mostSevereReservedList, mostSevereReservationType);
|
tld, matchCount, mostSevereReservedList, mostSevereReservationType);
|
||||||
reservedListProcessingTimes.record(
|
reservedListProcessingTime.record(
|
||||||
elapsedMillis, tld, matchCount, mostSevereReservedList, mostSevereReservationType);
|
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 com.google.common.truth.Truth.assertWithMessage;
|
||||||
import static google.registry.model.registry.label.DomainLabelMetrics.reservedListChecks;
|
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.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.ALLOWED_IN_SUNRISE;
|
||||||
import static google.registry.model.registry.label.ReservationType.FULLY_BLOCKED;
|
import static google.registry.model.registry.label.ReservationType.FULLY_BLOCKED;
|
||||||
import static google.registry.model.registry.label.ReservationType.MISTAKEN_PREMIUM;
|
import static google.registry.model.registry.label.ReservationType.MISTAKEN_PREMIUM;
|
||||||
|
@ -76,7 +76,7 @@ public class ReservedListTest {
|
||||||
inject.setStaticField(Ofy.class, "clock", clock);
|
inject.setStaticField(Ofy.class, "clock", clock);
|
||||||
createTld("tld");
|
createTld("tld");
|
||||||
reservedListChecks.reset();
|
reservedListChecks.reset();
|
||||||
reservedListProcessingTimes.reset();
|
reservedListProcessingTime.reset();
|
||||||
reservedListHits.reset();
|
reservedListHits.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ public class ReservedListTest {
|
||||||
.hasValueForLabels(unreservedCount, "tld", "0", "(none)", UNRESERVED.toString())
|
.hasValueForLabels(unreservedCount, "tld", "0", "(none)", UNRESERVED.toString())
|
||||||
.and()
|
.and()
|
||||||
.hasNoOtherValues();
|
.hasNoOtherValues();
|
||||||
assertThat(reservedListProcessingTimes)
|
assertThat(reservedListProcessingTime)
|
||||||
.hasAnyValueForLabels("tld", "0", "(none)", UNRESERVED.toString())
|
.hasAnyValueForLabels("tld", "0", "(none)", UNRESERVED.toString())
|
||||||
.and()
|
.and()
|
||||||
.hasNoOtherValues();
|
.hasNoOtherValues();
|
||||||
|
@ -153,7 +153,7 @@ public class ReservedListTest {
|
||||||
.hasValueForLabels(6, "tld", "1", "reserved1", RESERVED_FOR_ANCHOR_TENANT.toString())
|
.hasValueForLabels(6, "tld", "1", "reserved1", RESERVED_FOR_ANCHOR_TENANT.toString())
|
||||||
.and()
|
.and()
|
||||||
.hasNoOtherValues();
|
.hasNoOtherValues();
|
||||||
assertThat(reservedListProcessingTimes)
|
assertThat(reservedListProcessingTime)
|
||||||
.hasAnyValueForLabels("tld", "0", "(none)", UNRESERVED.toString())
|
.hasAnyValueForLabels("tld", "0", "(none)", UNRESERVED.toString())
|
||||||
.and()
|
.and()
|
||||||
.hasAnyValueForLabels("tld", "1", "reserved1", RESERVED_FOR_ANCHOR_TENANT.toString())
|
.hasAnyValueForLabels("tld", "1", "reserved1", RESERVED_FOR_ANCHOR_TENANT.toString())
|
||||||
|
@ -232,7 +232,7 @@ public class ReservedListTest {
|
||||||
.hasValueForLabels(1, "tld", "0", "(none)", UNRESERVED.toString())
|
.hasValueForLabels(1, "tld", "0", "(none)", UNRESERVED.toString())
|
||||||
.and()
|
.and()
|
||||||
.hasNoOtherValues();
|
.hasNoOtherValues();
|
||||||
assertThat(reservedListProcessingTimes)
|
assertThat(reservedListProcessingTime)
|
||||||
.hasAnyValueForLabels("tld", "1", "reserved2", FULLY_BLOCKED.toString())
|
.hasAnyValueForLabels("tld", "1", "reserved2", FULLY_BLOCKED.toString())
|
||||||
.and()
|
.and()
|
||||||
.hasAnyValueForLabels("tld", "1", "reserved2", NAME_COLLISION.toString())
|
.hasAnyValueForLabels("tld", "1", "reserved2", NAME_COLLISION.toString())
|
||||||
|
@ -301,7 +301,7 @@ public class ReservedListTest {
|
||||||
.hasValueForLabels(2, "tld", "1", "reserved2", FULLY_BLOCKED.toString())
|
.hasValueForLabels(2, "tld", "1", "reserved2", FULLY_BLOCKED.toString())
|
||||||
.and()
|
.and()
|
||||||
.hasNoOtherValues();
|
.hasNoOtherValues();
|
||||||
assertThat(reservedListProcessingTimes)
|
assertThat(reservedListProcessingTime)
|
||||||
.hasAnyValueForLabels("tld", "0", "(none)", UNRESERVED.toString())
|
.hasAnyValueForLabels("tld", "0", "(none)", UNRESERVED.toString())
|
||||||
.and()
|
.and()
|
||||||
.hasAnyValueForLabels("tld", "1", "reserved1", FULLY_BLOCKED.toString())
|
.hasAnyValueForLabels("tld", "1", "reserved1", FULLY_BLOCKED.toString())
|
||||||
|
@ -355,7 +355,7 @@ public class ReservedListTest {
|
||||||
.hasValueForLabels(1, "tld", "0", "(none)", UNRESERVED.toString())
|
.hasValueForLabels(1, "tld", "0", "(none)", UNRESERVED.toString())
|
||||||
.and()
|
.and()
|
||||||
.hasNoOtherValues();
|
.hasNoOtherValues();
|
||||||
assertThat(reservedListProcessingTimes)
|
assertThat(reservedListProcessingTime)
|
||||||
.hasAnyValueForLabels("tld", "1", "reserved2", FULLY_BLOCKED.toString())
|
.hasAnyValueForLabels("tld", "1", "reserved2", FULLY_BLOCKED.toString())
|
||||||
.and()
|
.and()
|
||||||
.hasAnyValueForLabels("tld", "0", "(none)", UNRESERVED.toString())
|
.hasAnyValueForLabels("tld", "0", "(none)", UNRESERVED.toString())
|
||||||
|
@ -382,7 +382,7 @@ public class ReservedListTest {
|
||||||
.hasValueForLabels(1, "tld", "2", "reserved2", FULLY_BLOCKED.toString())
|
.hasValueForLabels(1, "tld", "2", "reserved2", FULLY_BLOCKED.toString())
|
||||||
.and()
|
.and()
|
||||||
.hasNoOtherValues();
|
.hasNoOtherValues();
|
||||||
assertThat(reservedListProcessingTimes)
|
assertThat(reservedListProcessingTime)
|
||||||
.hasAnyValueForLabels("tld", "1", "reserved1", ALLOWED_IN_SUNRISE.toString())
|
.hasAnyValueForLabels("tld", "1", "reserved1", ALLOWED_IN_SUNRISE.toString())
|
||||||
.and()
|
.and()
|
||||||
.hasAnyValueForLabels("tld", "2", "reserved2", FULLY_BLOCKED.toString())
|
.hasAnyValueForLabels("tld", "2", "reserved2", FULLY_BLOCKED.toString())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue