def METHOD_NAME(classpath, data, docsPerSec, reopensPerSec, fullIndexPath, 
           mode='update',
           dir='MMapDirectory',
           seed=17,
           runTimeSec=60,
           numSearchThreads=1,
           numIndexThreads=constants.INDEX_NUM_THREADS,
           statsEverySec=1,
           commit="no"):
  logFileName = '%s/%s_dps%s_reopen%s.txt' % (constants.LOGS_DIR, mode, docsPerSec, reopensPerSec)
  print 'log: %s' % logFileName
  command = constants.JAVA_COMMAND
  command += ' -cp "%s"' % classpath
  command += ' perf.NRTPerfTest'
  command += ' %s' % dir
  command += ' %s' % fullIndexPath
  command += ' multi'
  command += ' %s' % data.lineFile
  command += ' %s' % seed
  command += ' %s' % docsPerSec
  command += ' %s' % runTimeSec
  command += ' %s' % numSearchThreads
  command += ' %s' % numIndexThreads
  command += ' %s' % reopensPerSec
  command += ' %s' % mode
  command += ' %s' % statsEverySec
  command += ' %s' % commit
  command += ' 0.0'
  command += ' %s' % data.tasksFile 
  command += ' > %s 2>&1' % logFileName
  if VERBOSE:
    print
    print 'run: %s' % command
  os.system(command)
  result = open(logFileName, 'rb').read()
  if VERBOSE:
    print result
  try:
    reopenStats = ReopenStats()
    for line in result.split('\n'):
      m = reByTime.match(line.rstrip())
      if m is not None:
        t = int(m.group(1))
        # discard first 5 seconds -- warmup
        if t >= (5*float(reopensPerSec)):
          reopenStats.totalSearches += int(m.group(2))
          reopenStats.totalDocs += int(m.group(3))
          reopenStats.totalReopens += int(m.group(4))
          reopenStats.totalUpdateTime += int(m.group(5))
          reopenStats.qtCount += 1
    # Reopen times
    times = []
    for line in open(logFileName, 'rb').read().split('\n'):
      m = reNRTReopenTime.match(line.rstrip())
      if m is not None:
        times.append(float(m.group(1)))
    # Discard first 10% (JVM warmup): minimum of 1 but no more than 10
    times = times[min(10, max(1, len(times) / 10)):]
    # Discard worst 2%
    times.sort()
    numDrop = len(times)/50
    if numDrop > 0:
      print 'drop: %s' % ' '.join(['%.1f' % x for x in times[-numDrop:]])
      times = times[:-numDrop]
    if VERBOSE:
      print 'times: %s' % ' '.join(['%.1f' % x for x in times])
    minVal, maxVal, mean, stdDev = stats.getStats(times)
    reopenStats.meanReopenTime = mean
    reopenStats.stddevReopenTime = stdDev
    if VERBOSE:
      print 'reopen stats:'
      reopenStats.toString()
      print
    return reopenStats
  except:
    print 'FAILED -- output:\n%s' % result
    raise