def METHOD_NAME(rowPoint, logsDir, warmupSec, names, fileName, maxQPS=None):
  graphData = []
  if rowPoint == 'min':
    sla = None
  elif rowPoint == 'max':
    sla = SLA[-1][1]
  else:
    sla = None
    for pct, maxResponseTime in SLA:
      if pct == logPoints[rowPoint][0]:
        sla = maxResponseTime
        break
  passesSLA = set()
  maxActualQPS = {}
  for name in names:
    reQPS = re.compile(r'^%s\.qps([\.0-9]+)(\.|$)' % re.escape(name))
    for f in os.listdir(logsDir):
      m = reQPS.match(f)
      resultsFile = '%s/%s/results.pk' % (logsDir, f)
      if not os.path.exists(resultsFile):
        resultsFile = '%s/%s/results.bin' % (logsDir, f)
      if m is not None and os.path.exists(resultsFile):
        qps = float(m.group(1))
        if False and qps > 575:
          continue
        if maxQPS is not None and qps > maxQPS:
          print 'SKIPPING %s qps' % qps
          continue
        # qps is the "target", ie the rate at which we sent the
        # queries to the server; actualQPS is what the server actually
        # achieved overall:
        pctPoints, actualQPS, endTimeSec = responseTimeGraph.getPctPoints(resultsFile, name, warmupSec)
        print '%s: qps %s, actualQPS %s' % (name, qps, actualQPS)
        if rowPoint == 'min':
          t = pctPoints[0]
        elif rowPoint == 'max':
          t = pctPoints[-1]
        else:
          if rowPoint+1 >= len(pctPoints):
            break
          t = pctPoints[1+rowPoint]
        if sla is not None and t <= sla:
          passesSLA.add((qps, name))
          print '  PASS'
        if True or t < 30000:
          graphData.append((qps, actualQPS, name, t))
        else:
          print '%s: drop data point qps=%s t=%s: t is >= 30000' % (name, qps, t)
        if name not in maxActualQPS:
          maxActualQPS[name] = actualQPS
        elif actualQPS > maxActualQPS[name]:
          maxActualQPS[name] = actualQPS
  graphData.sort()
  l = []
  w = l.append
  w("['QPS', %s],\n" % (', '.join(["'%s'" % responseTimeGraph.cleanName(x) for x in names])),)
  for qps, actualQPS, name, responseTime in graphData:
    row = ['%.1f' % actualQPS]
    for name2 in names:
      if name2 == name:
        row.append('%.1f' % responseTime)
      else:
        row.append('null')
    w('[%s],\n' % ','.join(row))
  if rowPoint == 'max':
    p = 'Max'
  elif rowPoint == 'min':
    p = 'Min'
  else:
    p = '%g%%' % logPoints[rowPoint][0]
  html = graphHeader + ''.join(l) + graphFooter % p
  open(fileName, 'wb').write(html)
  print '  saved %s' % fileName
  if sla is None:
    return None, maxActualQPS
  else:
    return passesSLA, maxActualQPS