code: private <T extends Number> Gauge<Long> createKeyspaceGauge(String name, final MetricValue extractor)
      {
          allMetrics.add(name);
          return Metrics.newGauge(factory.createMetricName(name), new Gauge<Long>()
          {
              public Long value()
              {
                  long sum = 0;
                  for (ColumnFamilyStore cf : keyspace.getColumnFamilyStores())
                  {
                      sum += extractor.getValue(cf.metric);
                  }
                  return sum;
              }
          });
      }
docs: Creates a gauge that will sum the current value of a metric for all column families in this keyspace
  @param name
  @param MetricValue
  @return Gauge&gt;Long> that computes sum of MetricValue.getValue()