From 1164ca55dd7bb915bcac61e8a9b15ae009d51b66 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 7 Jan 2025 12:38:20 -1000 Subject: [PATCH] chore: add marshall benchmark (#353) --- tests/benchmarks/test_marshall.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/benchmarks/test_marshall.py diff --git a/tests/benchmarks/test_marshall.py b/tests/benchmarks/test_marshall.py new file mode 100644 index 00000000..17d333f1 --- /dev/null +++ b/tests/benchmarks/test_marshall.py @@ -0,0 +1,17 @@ +from dbus_fast import Message +from pytest_codspeed import BenchmarkFixture + +message = Message( + destination="org.bluez", + path="/", + interface="org.freedesktop.DBus.ObjectManager", + member="GetManagedObjects", +) + + +def test_marshall_bluez_get_managed_objects_message( + benchmark: BenchmarkFixture, +) -> None: + @benchmark + def marhsall_bluez_get_managed_objects_message(): + message._marshall(False)