code: public int getOptimalThreads(SyncOptimizeConfig syncOptConfig)
          throws IOException {
          File tempDir = FileUtils.getTempDirectory();
          this.dataDir = new File(tempDir, DATA_DIR_NAME);
          this.workDir = new File(tempDir, WORK_DIR_NAME);
  
          String prefix = "sync-optimize/" +
                          InetAddress.getLocalHost().getHostName() + "/";
  
          TestDataHandler dataHandler = new TestDataHandler();
          dataHandler.createDirectories(dataDir, workDir);
          dataHandler.createTestData(dataDir,
                                     syncOptConfig.getNumFiles(),
                                     syncOptConfig.getSizeFiles());
  
          SyncTestManager testManager =
              new SyncTestManager(syncOptConfig, dataDir, workDir,
                                  syncTestStatus, prefix);
          int optimalThreads = testManager.runTest();
  
          dataHandler.removeDirectories(dataDir, workDir);
  
          return optimalThreads;
      }
docs: Determines the optimal SyncTool thread count value. This value is
  discovered by running a series of timed tests and returning the fastest
  performer. The results of these tests depend highly on the machine they
  are run on, and the capacity of the network available to that machine.
  
  @param syncOptConfig tool configuration
  @return optimal thread count
  @throws IOException