Skip to content

Commit 8f56bc1

Browse files
g2gpsxiaoxiang781216
authored andcommitted
testing/sd_bench: Port sdbench testing utility for PX4-Autopilot.
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.
1 parent 532bcc5 commit 8f56bc1

File tree

5 files changed

+557
-0
lines changed

5 files changed

+557
-0
lines changed

LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2217,6 +2217,7 @@ library. If this is what you want to do, use the GNU Lesser General
22172217
Public License instead of this License.
22182218

22192219
apps/testing/sd_stress
2220+
apps/testing/sd_bench
22202221
===================
22212222

22222223
Copyright (c) 2016-2021 PX4 Development Team. All rights reserved.

testing/sd_bench/Kconfig

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#
2+
# For a description of the syntax of this configuration file,
3+
# see the file kconfig-language.txt in the NuttX tools repository.
4+
#
5+
6+
config TESTING_SD_BENCH
7+
tristate "SD benchmark program"
8+
depends on ALLOW_BSD_COMPONENTS
9+
default n
10+
---help---
11+
SD benchmark application based on https://github.com/PX4/PX4-Autopilot/blob/main/src/systemcmds/sd_bench/sd_bench.cpp
12+
13+
if TESTING_SD_BENCH
14+
15+
config TESTING_SD_BENCH_PROGNAME
16+
string "Program name"
17+
default "sdbench"
18+
---help---
19+
This is the name of the program that will be used when the NSH ELF
20+
program is installed.
21+
22+
config TESTING_SD_BENCH_PRIORITY
23+
int "SD bench task priority"
24+
default 100
25+
26+
config TESTING_SD_BENCH_STACKSIZE
27+
int "SD bench stack size"
28+
default DEFAULT_TASK_STACKSIZE
29+
30+
config TESTING_SD_BENCH_DEVICE
31+
string "SD / MMC mount point"
32+
default "/mnt"
33+
34+
config TESTING_SD_MEM_ALIGN_BYTES
35+
int "Allocated memory alignment"
36+
---help---
37+
Specifies the memory alignment (bytes) used for allocated buffers, when enabled with the -a argument.
38+
default 512
39+
40+
endif

testing/sd_bench/Make.defs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ifneq ($(CONFIG_TESTING_SD_BENCH),)
2+
CONFIGURED_APPS += $(APPDIR)/testing/sd_bench
3+
endif

testing/sd_bench/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
include $(APPDIR)/Make.defs
2+
3+
PROGNAME = $(CONFIG_TESTING_SD_BENCH_PROGNAME)
4+
PRIORITY = $(CONFIG_TESTING_SD_BENCH_PRIORITY)
5+
STACKSIZE = $(CONFIG_TESTING_SD_BENCH_STACKSIZE)
6+
MODULE = $(CONFIG_TESTING_SD_BENCH)
7+
8+
MAINSRC = sd_bench_main.c
9+
10+
include $(APPDIR)/Application.mk

0 commit comments

Comments
 (0)