Skip to content

Commit

Permalink
Fixed bug, introduced by #3, that broke distributed mode
Browse files Browse the repository at this point in the history
  • Loading branch information
heyman committed Mar 20, 2012
1 parent 0ca0af4 commit 9c4e54c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions locust/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,10 @@ def on_report_to_master(client_id, data):

def on_slave_report(client_id, data):
for stats in data["stats"]:
request_key = (stats.method, stats.name)
if not stats.name in RequestStats.requests:
RequestStats.requests[stats.name] = RequestStats(stats.name)
RequestStats.requests[stats.name].iadd_stats(stats, full_request_history=True)
RequestStats.requests[request_key] = RequestStats(stats.method, stats.name)
RequestStats.requests[request_key].iadd_stats(stats, full_request_history=True)
RequestStats.global_last_request_timestamp = max(RequestStats.global_last_request_timestamp, stats.last_request_timestamp)

for err_message, err_count in data["errors"].iteritems():
Expand Down

0 comments on commit 9c4e54c

Please sign in to comment.