public class MetricsBench {
public static void main(String[] args) {
long iters = Long.parseLong(args[0]);
Metrics metrics = new Metrics();
Sensor parent = metrics.sensor("parent");
Sensor child = metrics.sensor("child", parent);
for (Sensor sensor : Arrays.asList(parent, child)) {
sensor.add(sensor.name() + ".avg", new Avg());
sensor.add(sensor.name() + ".count", new Count());
sensor.add(sensor.name() + ".max", new Max());
sensor.add(new Percentiles(1024,