Skip to content

Commit

Permalink
locust close connections for each request (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
annapendleton authored Mar 11, 2024
1 parent 0160a85 commit c0ac689
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def lm_generate(self):
prompt = test_data[random.randrange(0, len(test_data))]

request = generate_request(model_params, prompt)
headers = {"User-Agent": "Benchmark Client"}
headers = {"User-Agent": "Benchmark Client", "Connection": "close"}
logging.info(f"Sending request: {request}")
with self.client.post("/generate", headers=headers, json=request, catch_response=True) as resp:
if resp.status_code != 200:
Expand Down

0 comments on commit c0ac689

Please sign in to comment.