Skip to content

Commit

Permalink
locust close connections for each request
Browse files Browse the repository at this point in the history
  • Loading branch information
annapendleton committed Mar 11, 2024
1 parent c9df187 commit e1b94d9
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 e1b94d9

Please sign in to comment.