kopia lustrzana https://github.com/micropython/micropython
tests/multi_bluetooth: Use multitest.output_metric in BLE perf tests.
Signed-off-by: Damien George <damien@micropython.org>pull/11052/head
rodzic
af42634866
commit
6c76248960
|
@ -128,7 +128,7 @@ def instance1():
|
||||||
ticks_end = time.ticks_ms()
|
ticks_end = time.ticks_ms()
|
||||||
ticks_total = time.ticks_diff(ticks_end, ticks_start)
|
ticks_total = time.ticks_diff(ticks_end, ticks_start)
|
||||||
|
|
||||||
print(
|
multitest.output_metric(
|
||||||
"Did {} writes in {} ms. {} ms/write, {} bytes/sec".format(
|
"Did {} writes in {} ms. {} ms/write, {} bytes/sec".format(
|
||||||
_NUM_NOTIFICATIONS,
|
_NUM_NOTIFICATIONS,
|
||||||
ticks_total,
|
ticks_total,
|
||||||
|
|
|
@ -90,7 +90,7 @@ def instance0():
|
||||||
|
|
||||||
ticks_end = time.ticks_ms()
|
ticks_end = time.ticks_ms()
|
||||||
ticks_total = time.ticks_diff(ticks_end, ticks_start)
|
ticks_total = time.ticks_diff(ticks_end, ticks_start)
|
||||||
print(
|
multitest.output_metric(
|
||||||
"Acknowledged {} notifications in {} ms. {} ms/notification.".format(
|
"Acknowledged {} notifications in {} ms. {} ms/notification.".format(
|
||||||
_NUM_NOTIFICATIONS, ticks_total, ticks_total // _NUM_NOTIFICATIONS
|
_NUM_NOTIFICATIONS, ticks_total, ticks_total // _NUM_NOTIFICATIONS
|
||||||
)
|
)
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
--- instance0 ---
|
||||||
|
gap_advertise
|
||||||
|
gap_disconnect: True
|
||||||
|
--- instance1 ---
|
||||||
|
gap_connect
|
|
@ -134,7 +134,7 @@ def instance1():
|
||||||
ble.l2cap_disconnect(conn_handle, cid)
|
ble.l2cap_disconnect(conn_handle, cid)
|
||||||
wait_for_event(_IRQ_L2CAP_DISCONNECT, TIMEOUT_MS)
|
wait_for_event(_IRQ_L2CAP_DISCONNECT, TIMEOUT_MS)
|
||||||
|
|
||||||
print(
|
multitest.output_metric(
|
||||||
"Received {}/{} bytes in {} ms. {} B/s".format(
|
"Received {}/{} bytes in {} ms. {} B/s".format(
|
||||||
recv_bytes, recv_correct, total_ticks, recv_bytes * 1000 // total_ticks
|
recv_bytes, recv_correct, total_ticks, recv_bytes * 1000 // total_ticks
|
||||||
)
|
)
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
--- instance0 ---
|
||||||
|
|
||||||
|
--- instance1 ---
|
||||||
|
|
Ładowanie…
Reference in New Issue