Measure contact intersection rate directly.

This commit is contained in:
Jon Chambers
2020-11-18 13:10:39 -05:00
committed by Jon Chambers
parent 0aafe38496
commit d764058a04

View File

@@ -62,6 +62,7 @@ public class DirectoryController {
private final Logger logger = LoggerFactory.getLogger(DirectoryController.class);
private final MetricRegistry metricRegistry = SharedMetricRegistries.getOrCreate(Constants.METRICS_NAME);
private final Histogram contactsHistogram = metricRegistry.histogram(name(getClass(), "contacts"));
private final Meter contactsMeter = metricRegistry.meter(name(getClass(), "contactRate"));
private final Map<String, Meter> iosFeedbackMeters = new HashMap<String, Meter>() {{
for (String status : FEEDBACK_STATUSES) {
@@ -172,6 +173,7 @@ public class DirectoryController {
rateLimiters.getContactsLimiter().validate(account.getNumber(), contacts.getContacts().size());
contactsHistogram.update(contacts.getContacts().size());
contactsMeter.mark(contacts.getContacts().size());
try {
List<byte[]> tokens = new LinkedList<>();