You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
? It's not THAT clean but I think it works fine in this case -- just specify the 'bulk' counter at 'sub' counter creation time, but if it already exists reuse it.
From [email protected] on December 20, 2010 13:37:41
Cowan had a nice idea for an AggregateCounter that does in built totalizing of a set of ‘Instance Domains":
Counter bulkCounter = AggregatedCounters.aggregate(registry, "elasticsearch.index.bulk", "elasticsearch.index.buik.shard" + shardId, Unit.ONE, ...);
with something like:
CompositeCounter aggregate(MonitorableRegistry registry, String topLevel, String subLevel, Unit...) { Monitorable existingCounter = registry.getMonitorable(topLevel);
if (existingCounter == null) {
// Create the counter
} else if (! existingCounter instanceof Counter) {
// Uh-oh, there's an existing metric that's not actually a counter. What idiot made that?
throw new IdiotException();
}
? It's not THAT clean but I think it works fine in this case -- just specify the 'bulk' counter at 'sub' counter creation time, but if it already exists reuse it.
Original issue: http://code.google.com/p/parfait/issues/detail?id=5
The text was updated successfully, but these errors were encountered: