def prep_totals(head_res, baseline_res):
 (head_res, baseline_res) = head_res.align(baseline_res)
 ratio = (head_res['timing'] / baseline_res['timing'])
 totals = DataFrame({HEAD_COL: head_res['timing'], BASE_COL: baseline_res['timing'], 'ratio': ratio, 'name': baseline_res.name}, columns=[HEAD_COL, BASE_COL, 'ratio', 'name'])
 totals = totals.ix[(totals[HEAD_COL] > args.min_duration)]
 totals = totals.dropna().sort('ratio').set_index('name')
 return totals

def prep_totals ( head_res , baseline_res ) : ( head_res , baseline_res ) = head_res . align ( baseline_res ) ratio = ( head_res [ 'timing' ] / baseline_res [ 'timing' ] ) totals = DataFrame ( { HEAD_COL : head_res [ 'timing' ] , BASE_COL : baseline_res [ 'timing' ] , 'ratio' : ratio , 'name' : baseline_res . name } , columns = [ HEAD_COL , BASE_COL , 'ratio' , 'name' ] ) totals = totals . ix [ ( totals [ HEAD_COL ] > args . min_duration ) ] totals = totals . dropna ( ) . sort ( 'ratio' ) . set_index ( 'name' ) return totals
each argument should be a dataframe with timing and name columns where name is the name of the vbench .