code: @Override
    public <T extends IMetric<U>, U> T registerMetric(String name,
                                                      T metric,
                                                      int timeBucketSizeInSecs) {
      metricsCollector.registerMetric(name, metric, timeBucketSizeInSecs);
      return metric;
    }
docs: /*
  Register a IMetric instance.
  Heron 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.