Skip to content

Commit

Permalink
update with timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
nnshah1 committed Feb 29, 2024
1 parent 66b4c97 commit 1c319d6
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ def client(endpoint, request_count, prompt, save_image, index):
filename_input = "%20".join(f"&filename={filename}".split(" "))
else:
filename_input = ""
input = "%20".join(prompt.split(" "))
prompt_input = "%20".join(prompt.split(" "))
request_start = time.time()
resp = requests.get(
f"http://127.0.0.1:8000/{endpoint}?prompt={input}{filename_input}"
requests.get(
f"http://127.0.0.1:8000/{endpoint}?prompt={prompt_input}{filename_input}",
timeout=60,
)
latencies.append(time.time() - request_start)
print(
Expand Down

0 comments on commit 1c319d6

Please sign in to comment.