Skip to content

Commit

Permalink
bench: socketio methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Dec 16, 2024
1 parent adcef93 commit df53ace
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions caffeination/microbenchmarks/bench_web_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@ def bench_request_authed_overheads():
assert resp.status_code == 200


def bench_request_socketio_auth():
resp = request("GET", "/api/method/frappe.realtime.get_user_info", auth=True)
assert resp.status_code == 200


def bench_request_socketio_perm_check():
resp = request(
"GET",
"/api/method/frappe.realtime.has_permission",
auth=True,
data={"doctype": "Role", "name": "Guest"},
)
assert resp.status_code == 200


def bench_request_getdoc():
resp = request(
"POST",
Expand Down

0 comments on commit df53ace

Please sign in to comment.