File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1212with open (args .input ) as csv_file :
1313 csv_reader = csv .reader (csv_file )
1414 next (csv_reader )
15- for name , time , _ , _ in csv_reader :
15+ for row in csv_reader :
16+ name = row [2 ]
17+ time = float (row [3 ])
1618 if name in time_dict .keys ():
17- time_dict [name ].append (float ( time ) )
19+ time_dict [name ].append (time )
1820 else :
19- time_dict [name ] = [float ( time ) ]
21+ time_dict [name ] = [time ]
2022
2123data = [["name" , "time" , "stdev" ]]
2224for name , time_list in time_dict .items ():
2325 mean = statistics .mean (time_list [args .discard :])
24- stdev = statistics .stdev (time_list [args .discard :])
26+ runs = len (time_list [args .discard :])
27+ stdev = 0.0 if runs == 1 else statistics .stdev (time_list [args .discard :])
2528 data .append ([name , mean , stdev ])
2629
2730with open (args .output , 'w' ) as csv_file :
You can’t perform that action at this time.
0 commit comments