code: public synchronized Map<String, Metric> add(CompoundStat stat, MetricConfig config) {
          this.stats.add(Utils.notNull(stat));
          MetricConfig statConfig = (config == null ? this.config : config);
          this.statConfigs.put(stat, statConfig);
          Map<String, Metric> addedMetrics = new HashMap<String, Metric>();
          for (NamedMeasurable m : stat.stats()) {
              TehutiMetric metric = new TehutiMetric(this, m.name(), m.description(), m.stat(), statConfig, time);
              this.registry.registerMetric(metric);
              this.metrics.add(metric);
              addedMetrics.put(metric.name(), metric);
          }
          return addedMetrics;
      }
docs: Register a compound statistic with this sensor which yields multiple measurable quantities (like a histogram)
  @param stat The stat to register
  @param config The configuration for this stat. If null then the stat will use the default configuration for this
  sensor.
  
  @return a map of {@link Metric} indexed by their name, each of which were contained in the {@link CompoundStat}
  and added to this sensor.