feat(putTogether): read db also combined

This commit is contained in:
2024-11-30 15:35:56 -07:00
parent 838e53905a
commit 76632341e5
12 changed files with 37 additions and 23 deletions

View File

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