-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add benchmark tool and doc #147
Conversation
apps/bench.py
Outdated
self.expected_packet_index = packet_index + 1 | ||
|
||
if packet_flags & PACKET_FLAG_LAST: | ||
asyncio.create_task( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of python/cpython#88831, I suggest to push the packet to a queue and to loop get/send in // of self.done.wait()
in async def run(self)
bellow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! I wasn't aware of that. I have to go and check that we don't have this potential issue elsewhere in the code base.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in latest commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just thought about that but we can call it spawn instead of run?
Edit: not this one, I mean the new one in AsyncRunner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good point, spawn
is a better name for it.
LGTM 👍 |
This is a "swiss army knife" benchmarking tool that can be used to test the throughput and/or latency between two devices.
Supported modes:
Supported roles:
One device runs as the Central (with the ability to specify a custom Connection Interval and PHY), the other as the Peripheral.
The modes are independent of the roles and of the central/peripheral choice. So, for example, you can have a Central be a Sender as a GATT client (default), and the Peripheral be the Receiver as a GATT server. But you could also have the Central be a Receiver as a GATT client, or a Sender as a GATT server, etc.