static TestOptions calculateRowsAndSize(final TestOptions opts) {
    int rowsPerGB = getRowsPerGB(opts);
    if (
      (opts.getCmdName() != null
        && (opts.getCmdName().equals(RANDOM_READ) || opts.getCmdName().equals(RANDOM_SEEK_SCAN)))
        && opts.size != DEFAULT_OPTS.size && opts.perClientRunRows != DEFAULT_OPTS.perClientRunRows
    ) {
      opts.totalRows = (long) (opts.size * rowsPerGB);
    } else if (opts.size != DEFAULT_OPTS.size) {
      // total size in GB specified
      opts.totalRows = (long) (opts.size * rowsPerGB);
      opts.perClientRunRows = opts.totalRows / opts.numClientThreads;
    } else {
      opts.totalRows = opts.perClientRunRows * opts.numClientThreads;
      // Cast to float to ensure floating-point division
      opts.size = (float) opts.totalRows / rowsPerGB;
    }
    return opts;
  }
Validates opts after all the opts are parsed, so that caller need not to maintain order of opts
hbase-diagnostics/src/main/java/org/apache/hadoop/hbase/PerformanceEvaluation.java