10000 tests/multi_bluetooth: Use multitest.output_metric in BLE perf tests. · peterwillcn/micropython@6c76248 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6c76248

Browse files
committed
tests/multi_bluetooth: Use multitest.output_metric in BLE perf tests.
Signed-off-by: Damien George <damien@micropython.org>
1 parent af42634 commit 6c76248

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

tests/multi_bluetooth/perf_gatt_char_write.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def instance1():
128128
ticks_end = time.ticks_ms()
129129
ticks_total = time.ticks_diff(ticks_end, ticks_start)
130130

131-
print(
131+
multitest.output_metric(
132132
"Did {} writes in {} ms. {} ms/write, {} bytes/sec".format(
133133
_NUM_NOTIFICATIONS,
134134
ticks_total,

tests/multi_bluetooth/perf_gatt_notify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def instance0():
9090

9191
ticks_end = time.ticks_ms()
9292
ticks_total = time.ticks_diff(ticks_end, ticks_start)
93-
print(
93+
multitest.output_metric(
9494
"Acknowledged {} notifications in {} ms. {} ms/notification.".format(
9595
_NUM_NOTIFICATIONS, ticks_total, ticks_total // _NUM_NOTIFICATIONS
9696
)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
--- instance0 ---
2+
gap_advertise
3+
gap_disconnect: True
4+
--- instance1 ---
5+
gap_connect

tests/multi_bluetooth/perf_l2cap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def instance1():
134134
ble.l2cap_disconnect(conn_handle, cid)
135135
wait_for_event(_IRQ_L2CAP_DISCONNECT, TIMEOUT_MS)
136136

137-
print(
137+
multitest.output_metric(
138138
"Received {}/{} bytes in {} ms. {} B/s".format(
139139
recv_bytes, recv_correct, total_ticks, recv_bytes * 1000 // total_ticks
140140
)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
--- instance0 ---
2+
3+
--- instance1 ---
4+

0 commit comments

Comments
 (0)
0