private void runTest(final Class<? extends TestBase> cmd, TestOptions opts)
    throws IOException, InterruptedException, ClassNotFoundException, ExecutionException {
    // Log the configuration we're going to run with. Uses JSON mapper because lazy. It'll do
    // the TestOptions introspection for us and dump the output in a readable format.
    LOG.info(cmd.getSimpleName() + " test run options=" + GSON.toJson(opts));
    Admin admin = null;
    Connection connection = null;
    try {
      connection = ConnectionFactory.createConnection(getConf());
      admin = connection.getAdmin();
      checkTable(admin, opts);
    } finally {
      if (admin != null) admin.close();
      if (connection != null) connection.close();
    }
    if (opts.nomapred) {
      doLocalClients(opts, getConf());
    } else {
      doMapReduce(opts, getConf());
    }
  }
Compute a throughput rate in MB/s.
@param rows   Number of records consumed.
@param timeMs Time taken in milliseconds.
@return String value with label, ie '123.76 MB/s'
hbase-diagnostics/src/main/java/org/apache/hadoop/hbase/PerformanceEvaluation.java