code: public synchronized void beginSampling(int capacity)
      {
          if (!enabled)
          {
              summary = new StreamSummary<T>(capacity);
              hll = new HyperLogLogPlus(14);
              enabled = true;
          }
      }
docs: Start to record samples
  
  @param capacity
  Number of sample items to keep in memory, the lower this is
  the less accurate results are. For best results use value
  close to cardinality, but understand the memory trade offs.