Skip to content

Commit

Permalink
chore: add marshall benchmark (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Sep 9, 2022
1 parent 471def6 commit e386e22
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions bench/marshall.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import timeit

from dbus_fast import Message

message = Message(
destination="org.bluez",
path="/",
interface="org.freedesktop.DBus.ObjectManager",
member="GetManagedObjects",
)


def marhsall_bluez_get_managed_objects_message():
message._marshall()


count = 1000000
time = timeit.Timer(marhsall_bluez_get_managed_objects_message).timeit(count)
print(f"Marshalling {count} bluez get managed objects messages took {time} seconds")

0 comments on commit e386e22

Please sign in to comment.