code: @SuppressWarnings("unchecked")
    public <T extends IMetric> T registerMetric(String name, T metric, int timeBucketSizeInSecs) {
      MetricDelegate d = new MetricDelegate(metric);
      delegate.registerMetric(name, d, timeBucketSizeInSecs);
      return metric;
    }
docs: /*
  Register a IMetric instance.
  Storm will then call getValueAndReset on the metric every timeBucketSizeInSecs
  and the returned value is sent to all metrics consumers.
  You must call this during IBolt::prepare or ISpout::open.
  @return The IMetric argument unchanged.