g2gps opened a new pull request, #2164:
URL: https://github.com/apache/nuttx-apps/pull/2164

   ## Summary
   
   Add port of the sdbench utility from PX4-Autopilot: 
https://github.com/PX4/PX4-Autopilot
   
   This tool is useful for evaluating and testing peformance of SD cards, block 
devices or mount points.
   
   Used in conjunction with apache/nuttx#10478 .
   
   Documentation available in https://github.com/apache/nuttx/pull/11049
   
   Relevant Kconfig options:
   
   ```
   CONFIG_ALLOW_BSD_COMPONENTS=y
   CONFIG_TESTING_SD_BENCH=m
   CONFIG_TESTING_SD_BENCH_PROGNAME="sdstress"
   CONFIG_TESTING_SD_BENCH_PRIORITY=100
   CONFIG_TESTING_SD_BENCH_STACKSIZE=8192
   CONFIG_TESTING_SD_BENCH_DEVICE="/mnt"
   ```
   
   Help prompt:
   
   ```
   sdbench: [-b] [-r] [-d] [-k] [-s] [-u] [-v]
     -b   Block size per write (1-65536), default 512
     -r   Number of runs (1-10000), default 5
     -d   Max duration of a test (ms) (1-60000), default 2000
     -k   Keep test file when finished, default false
     -s   Call fsync after each block, false calls fsync
          only at the end of each run, default false
     -v   Verify data and block number, default true
   ```
   
   Example usage:
   
   ```  
   nsh> sdbench
   Using block size = 512 bytes, sync = false
   
   Testing Sequential Write Speed...
     Run  1:    345.9 KB/s, max write time: 156.907 ms (3.2 KB/s), fsync: 
259.687 ms
     Run  2:    378.8 KB/s, max write time: 30.273 ms (16.5 KB/s), fsync: 
240.832 ms
     Run  3:    372.1 KB/s, max write time: 37.630 ms (13.3 KB/s), fsync: 
261.005 ms
     Run  4:    341.7 KB/s, max write time: 186.352 ms (2.7 KB/s), fsync: 
240.875 ms
     Run  5:    375.6 KB/s, max write time: 37.785 ms (13.2 KB/s), fsync: 
250.928 ms
     Avg   :    362.8 KB/s, 3.999 MB written.
   
   Testing Sequential Read Speed...
     Run  1:    636.5 KB/s, max read/verify time: 54.1180 ms (9.2 KB/s)
     Run  2:    648.9 KB/s, max read/verify time: 54.0520 ms (9.3 KB/s)
     Run  3:    663.2 KB/s, max read/verify time: 43.5360 ms (11.5 KB/s)
     Run  4:    721.8 KB/s, max read/verify time: 11.7640 ms (42.5 KB/s)
     Avg   :    652.6 KB/s, 3.999 MB and verified
   ```
   
   ## Impact
   
   Aids in evaluation of SD card, block device or other mount point performance.
   
   ## Testing
   
   Local usage with apache/nuttx#10478 .
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to