Skip to content

Commit

Permalink
Merge pull request #113 from lrdcasimir/fix-csv-crash
Browse files Browse the repository at this point in the history
Don't crash generating CSV files if some bees timedout
  • Loading branch information
cosmin committed Mar 17, 2015
2 parents 5ff4c62 + b48d21e commit c56ddda
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions beeswithmachineguns/bees.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,10 @@ def _create_request_time_cdf_csv(results, complete_bees_params, request_time_cdf
header.append("bee %(instance_id)s [ms]" % p)
writer.writerow(header)
for i in range(100):
row = [i, request_time_cdf[i]]
row = [i, request_time_cdf[i]] if i < len(request_time_cdf) else [i,float("inf")]
for r in results:
row.append(r['request_time_cdf'][i]["Time in ms"])
if r is not None:
row.append(r['request_time_cdf'][i]["Time in ms"])
writer.writerow(row)


Expand Down

0 comments on commit c56ddda

Please sign in to comment.