Skip to content

Commit c026ea0

Browse files
committed
Added doc about mem-perf testing
1 parent e261464 commit c026ea0

1 file changed

Lines changed: 49 additions & 1 deletion

File tree

‎docs/test.md‎

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ When the link is a radio (not USB) the command also prints the radio link
6666
statistics snapshot taken at the end of the run: link quality, RSSI, uplink /
6767
downlink / radio-send rate, average retries, and power-detector rate.
6868

69-
### CSV output
69+
### CSV output (link-perf)
7070

7171
The global `--csv` flag emits a `metric,value,unit` table instead of the
7272
human-formatted output, so results can be parsed by scripts or pasted into
@@ -91,3 +91,51 @@ uplink_packets_per_sec,93.333,pkt/s
9191
link_quality,0.9950,ratio
9292
rssi_dbm,-55.00,dBm
9393
```
94+
95+
## Memory performance
96+
97+
Benchmark the firmware `MemoryTester` memory: write a known pattern, read it
98+
back, verify, and report write/read throughput plus any firmware-side write
99+
errors. Useful for spotting regressions in the memory subsystem or the link
100+
that carries memory traffic.
101+
102+
```text
103+
cfcli test mem-perf
104+
```
105+
106+
The tester returns/expects byte `(addr & 0xff)` at every address, so the
107+
verification is exact. The firmware-side write-error counter
108+
(`memTst.errCntW`) is reset at the start of the run and read at the end to
109+
confirm the firmware accepted every byte.
110+
111+
Options:
112+
113+
* `-n, --length <BYTES>` — bytes to write and read back (default: `4096`, the
114+
full MemoryTester size). Accepts hex (`0x1000`).
115+
116+
The command fails fast if the device does not expose exactly one
117+
`MemoryTester`, or if the requested length exceeds the tester size.
118+
119+
### CSV output (mem-perf)
120+
121+
The global `--csv` flag emits a `metric,value,unit` table:
122+
123+
```text
124+
cfcli --csv test mem-perf
125+
```
126+
127+
Example rows:
128+
129+
```csv
130+
metric,value,unit
131+
mem_perf_bytes,4096,B
132+
mem_perf_write_seconds,1.823,s
133+
mem_perf_read_seconds,1.215,s
134+
mem_perf_write_kbit_per_sec,17.974,kbit/s
135+
mem_perf_write_bytes_per_sec,2247.000,B/s
136+
mem_perf_write_packets_per_sec,74.900,pkt/s
137+
mem_perf_read_kbit_per_sec,26.967,kbit/s
138+
mem_perf_read_bytes_per_sec,3371.000,B/s
139+
mem_perf_read_packets_per_sec,112.367,pkt/s
140+
mem_perf_fw_write_errors,0,count
141+
```

0 commit comments

Comments
 (0)