MetricsTag tag = tag("t", "t desc", "t value");
assertSame("same tag", tag, tag("t", "t desc", "t value"));
}
@Test public void testInfoOverflow() {
MetricsInfo i0 = info("m0", "m desc");
for (int i = 0; i < MAX_INFO_NAMES + 1; ++i) {
info("m"+ i, "m desc");
if (i < MAX_INFO_NAMES) {
assertSame("m0 is still there", i0, info("m0", "m desc"));
}
}
assertNotSame("m0 is gone", i0, info("m0", "m desc"));
MetricsInfo i1 = info("m1", "m desc");
for (int i = 0; i < MAX_INFO_DESCS; ++i) {
info("m1", "m desc"+ i);
if (i < MAX_INFO_DESCS - 1) {
assertSame("i1 is still there", i1, info("m1", "m desc"));
}