feat(Packagers): started testing for post requests

This commit is contained in:
2024-11-30 12:02:30 -07:00
parent fcbee342b3
commit a0712e15eb
6 changed files with 34 additions and 6 deletions

View File

@ -13,6 +13,13 @@ def BenchMarkDjango():
# print(json.dumps(res, indent=1))
if __name__ == "__main__":
djangoTime = timeit.timeit(stmt=BenchMarkDjango, number=10)
pythonTime = timeit.timeit(stmt=BenchMarkServer, number=10)
print(f"FastAPI: {djangoTime}\nPython: {pythonTime}")
test = 0
if test:
djangoTime = timeit.timeit(stmt=BenchMarkDjango, number=10)
pythonTime = timeit.timeit(stmt=BenchMarkServer, number=10)
print(f"FastAPI: {djangoTime}\nPython: {pythonTime}")
reqbody = {
"body": {"message": "hello"}
}
rawRes = requests.post("http://localhost:8000/SelectInterview", reqbody)