parameters: (file, result)
docstring: parse wtperf file, all stats on single line, example format:
             Feb 13 17:55:14,0,0,156871,0,N,0,0,0,49,6,6146,0,0,0
docstring_summary: parse wtperf file, all stats on single line, example format:
             Feb 13 17:55:14,0,0,156871,0,N,0,0,0,49,6,6146,0,0,0
docstring_tokens: parse wtperf file all stats on single line example format : Feb 13 17 : 55 : 14 0 0 156871 0 N 0 0 0 49 6 6146 0 0 0
function: def parse_wtperf_file(file, result):
      """ parse wtperf file, all stats on single line, example format:
             Feb 13 17:55:14,0,0,156871,0,N,0,0,0,49,6,6146,0,0,0
      """
      print 'Processing wtperf file: ' + file
      fh = open(file, 'rU')
  
      # first line contains headings, replace microseconds with milliseconds
      headings = fh.next().strip('\n').split(',')[1:]
      headings = map(lambda h: h.replace('(uS)', ' (ms)'), headings)
  
      # parse rest of file
      for line in fh:
          month, day, time, values = re.split(r'[ ,]', line.strip('\n'), 3)
          values = values.split(',')
          for i, v in enumerate(values):
              if v == 'N': 
                  v = 0
              if v == 'Y': 
                  v = 1
              # convert us to ms
              if '(ms)' in headings[i]:
                  v = float(v) / 1000.0
              result['wtperf: ' + headings[i]].append((month + " " + day + " " + time, v))
function_tokens: def parse_wtperf_file ( file , result ) : print 'Processing wtperf file: ' + file fh = open ( file , 'rU' ) # first line contains headings, replace microseconds with milliseconds headings = fh . next ( ) . strip ( '\n' ) . split ( ',' ) [ 1 : ] headings = map ( lambda h : h . replace ( '(uS)' , ' (ms)' ) , headings ) # parse rest of file for line in fh : month , day , time , values = re . split ( r'[ ,]' , line . strip ( '\n' ) , 3 ) values = values . split ( ',' ) for i , v in enumerate ( values ) : if v == 'N' : v = 0 if v == 'Y' : v = 1 # convert us to ms if '(ms)' in headings [ i ] : v = float ( v ) / 1000.0 result [ 'wtperf: ' + headings [ i ] ] . append ( ( month + " " + day + " " + time , v ) )