long runThreads(Thread[] threads) throws Exception {
    final long startTime = EnvironmentEdgeManager.currentTime();
    for (Thread t : threads) {
      t.start();
    }
    for (Thread t : threads) {
      t.join();
    }
    return EnvironmentEdgeManager.currentTime() - startTime;
  }
Starts the threads and waits for them to finish.
@return time taken by threads to complete, in milliseconds.
hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureSchedulerPerformanceEvaluation.java