Skip to content

Commit

Permalink
removed global keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
nawaidshamim committed May 16, 2014
1 parent 2c6e6c0 commit 2c1bee6
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions examples/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def on_request_success(request_type, name, response_time, response_length):
"""
Event handler that get triggered on every successful request
"""
global stats
stats["content-length"] += response_length

def on_report_to_master(client_id, data):
Expand All @@ -45,7 +44,6 @@ def on_report_to_master(client_id, data):
to be sent to the locust master. It will allow us to add our extra content-length
data to the dict that is being sent, and then we clear the local stats in the slave.
"""
global stats
data["content-length"] = stats["content-length"]
stats["content-length"] = 0

Expand All @@ -55,7 +53,6 @@ def on_slave_report(client_id, data):
from a slave. Here we just add the content-length to the master's aggregated
stats dict.
"""
global stats
stats["content-length"] += data["content-length"]

# Hook up the event listeners
Expand Down

0 comments on commit 2c1bee6

Please sign in to comment.