From f91b18ed811bd284897983d449a264b0eb3265c7 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Sun, 22 Dec 2024 12:40:31 +0530 Subject: [PATCH] bench: frappe.call --- caffeine/microbenchmarks/bench_utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/caffeine/microbenchmarks/bench_utils.py b/caffeine/microbenchmarks/bench_utils.py index 97b2cd2..2cb36cd 100644 --- a/caffeine/microbenchmarks/bench_utils.py +++ b/caffeine/microbenchmarks/bench_utils.py @@ -100,3 +100,10 @@ def cache_in_redis(num): bench_parse_datetime = NanoBenchmark( "get_datetime('2042-12-22 00:01:02.000042')", setup="", globals={"get_datetime": get_datetime} ) + + +def test_fn(doctype: str, **kwargs): + pass + + +bench_frappe_call = NanoBenchmark("frappe.call(fn, {})", globals={"fn": test_fn})