src/main/java/org/apache/datasketches/characterization/kll/KllSketchSizeSpeedProfile.java [83:160]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    direct = Boolean.parseBoolean(prop.mustGet("direct"));
  }

  void configureCommon() {
    slope = (double) (lgMaxT - lgMinT) / (lgMinBpSL - lgMaxBpSL);

  }

  void configureSketch() {
    if (useDouble) {
      if (direct) {
        final WritableMemory dstMem = WritableMemory.allocate(10000);
        dsk = KllDoublesSketch.newDirectInstance(k, dstMem, memReqSvr);
      } else { //heap
        dsk = KllDoublesSketch.newHeapInstance(k);
      }
    } else { //useFloat
      if (direct) {
        final WritableMemory dstMem = WritableMemory.allocate(10000);
        fsk = KllFloatsSketch.newDirectInstance(k, dstMem, memReqSvr);
      } else { //heap
        fsk = KllFloatsSketch.newHeapInstance(k);
      }
    }
  }

//JobProfile interface
  @Override
  public void start(final Job job) {
    this.job = job;
    prop = job.getProperties();
    extractProperties();
    configureCommon();
    configureSketch();
    doTrials();
  }

  @Override
  public void shutdown() {}

  @Override
  public void cleanup() {}
  //end JobProfile

  /**
   * Traverses all the axis plot points and performs trials(sl) at each point
   * and outputs a row per axis plot point.
   */
  private void doTrials() {
    final int maxSL = 1 << lgMaxSL;
    final int minSL = 1 << lgMinSL;
    int lastSL = 0;
    job.printf(sFmt, (Object[]) columnLabels); //Header
    int pp = 1;
    while (lastSL < maxSL) { //Trials for each plotPoint on X-axis, and one row on output
      final int nextSL = lastSL == 0 ? minSL : (int)pwr2SeriesNext(ppoSL, lastSL);
      lastSL = nextSL;
      final int trials = getNumTrials(nextSL);

      double sumUpdateTimePerItem_nS = 0;
      for (int t = 0; t < trials; t++) {
        sumUpdateTimePerItem_nS += doTrial(nextSL);
      }
      final double meanUpdateTimePerItem_nS = sumUpdateTimePerItem_nS / trials;
      final int bytes = useDouble ? dsk.getSerializedSizeBytes() : fsk.getSerializedSizeBytes();
      job.printf(dFmt, pp, nextSL, trials, bytes, meanUpdateTimePerItem_nS);
      pp++;
    }
  }

  /**
   * Return the average update time per item for this trial
   * @param streamLen the streamLength for this trial
   * @return the average update time per item for this trial
   */
  private double doTrial(final int streamLen) {
    if (useDouble) {
      dsk.reset();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/apache/datasketches/characterization/kll/KllSketchVectorSizeSpeedProfile.java [81:158]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    direct = Boolean.parseBoolean(prop.mustGet("direct"));
  }

  void configureCommon() {
    slope = (double) (lgMaxT - lgMinT) / (lgMinBpSL - lgMaxBpSL);

  }

  void configureSketch() {
    if (useDouble) {
      if (direct) {
        final WritableMemory dstMem = WritableMemory.allocate(10000);
        dsk = KllDoublesSketch.newDirectInstance(k, dstMem, memReqSvr);
      } else { //heap
        dsk = KllDoublesSketch.newHeapInstance(k);
      }
    } else { //useFloat
      if (direct) {
        final WritableMemory dstMem = WritableMemory.allocate(10000);
        fsk = KllFloatsSketch.newDirectInstance(k, dstMem, memReqSvr);
      } else { //heap
        fsk = KllFloatsSketch.newHeapInstance(k);
      }
    }
  }

//JobProfile interface
  @Override
  public void start(final Job job) {
    this.job = job;
    prop = job.getProperties();
    extractProperties();
    configureCommon();
    configureSketch();
    doTrials();
  }

  @Override
  public void shutdown() {}

  @Override
  public void cleanup() {}
  //end JobProfile

  /**
   * Traverses all the axis plot points and performs trials(sl) at each point
   * and outputs a row per axis plot point.
   */
  private void doTrials() {
    final int maxSL = 1 << lgMaxSL;
    final int minSL = 1 << lgMinSL;
    int lastSL = 0;
    job.printf(sFmt, (Object[]) columnLabels); //Header
    int pp = 1;
    while (lastSL < maxSL) { //Trials for each plotPoint on X-axis, and one row on output
      final int nextSL = lastSL == 0 ? minSL : (int)pwr2SeriesNext(ppoSL, lastSL);
      lastSL = nextSL;
      final int trials = getNumTrials(nextSL);

      double sumUpdateTimePerItem_nS = 0;
      for (int t = 0; t < trials; t++) {
        sumUpdateTimePerItem_nS += doTrial(nextSL);
      }
      final double meanUpdateTimePerItem_nS = sumUpdateTimePerItem_nS / trials;
      final int bytes = useDouble ? dsk.getSerializedSizeBytes() : fsk.getSerializedSizeBytes();
      job.printf(dFmt, pp, nextSL, trials, bytes, meanUpdateTimePerItem_nS);
      pp++;
    }
  }

  /**
   * Return the average update time per item for this trial
   * @param streamLen the streamLength for this trial
   * @return the average update time per item for this trial
   */
  private double doTrial(final int streamLen) {
    if (useDouble) {
      dsk.reset();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



