apps:Move the performance tools to benchmark.

1.ramspeed
2.cachespeed
3.osperf
4.iozone
5.superPI

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
chenrun1 2023-11-06 12:17:22 +08:00 committed by Xiang Xiao
parent 4d6f4d00b0
commit e6c3930b2d
22 changed files with 72 additions and 72 deletions

View File

@ -3,27 +3,27 @@
# see the file kconfig-language.txt in the NuttX tools repository.
#
config TESTING_CACHESPEED
config BENCHMARK_CACHESPEED
bool "CACHE Speed Test"
depends on ARCH_ICACHE && ARCH_DCACHE
default n
---help---
Enable a simple CACHE speed test.
if TESTING_CACHESPEED
if BENCHMARK_CACHESPEED
config TESTING_CACHESPEED_PROGNAME
config BENCHMARK_CACHESPEED_PROGNAME
string "Program name"
default "cachespeed"
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.
config TESTING_CACHESPEED_PRIORITY
config BENCHMARK_CACHESPEED_PRIORITY
int "CACHE speed test task priority"
default 100
config TESTING_CACHESPEED_STACKSIZE
config BENCHMARK_CACHESPEED_STACKSIZE
int "CACHE speed test stack size"
default DEFAULT_TASK_STACKSIZE

View File

@ -1,5 +1,5 @@
############################################################################
# apps/testing/osperf/Make.defs
# apps/benchmarks/cachespeed/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@ -18,6 +18,6 @@
#
############################################################################
ifneq ($(CONFIG_TESTING_OSPERF),)
CONFIGURED_APPS += $(APPDIR)/testing/osperf
ifneq ($(CONFIG_BENCHMARK_CACHESPEED),)
CONFIGURED_APPS += $(APPDIR)/benchmarks/cachespeed
endif

View File

@ -1,5 +1,5 @@
############################################################################
# apps/testing/cachespeed/Makefile
# apps/benchmarks/cachespeed/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@ -26,10 +26,10 @@ ifneq ($(CONFIG_CACHESPEED_MONOTONIC_TIME),y)
CFLAGS += -DCACHESPEED_PERFTIME
endif
PROGNAME = $(CONFIG_TESTING_CACHESPEED_PROGNAME)
PRIORITY = $(CONFIG_TESTING_CACHESPEED_PRIORITY)
STACKSIZE = $(CONFIG_TESTING_CACHESPEED_STACKSIZE)
MODULE = $(CONFIG_TESTING_CACHESPEED)
PROGNAME = $(CONFIG_BENCHMARK_CACHESPEED_PROGNAME)
PRIORITY = $(CONFIG_BENCHMARK_CACHESPEED_PRIORITY)
STACKSIZE = $(CONFIG_BENCHMARK_CACHESPEED_STACKSIZE)
MODULE = $(CONFIG_BENCHMARK_CACHESPEED)
MAINSRC = cachespeed_main.c

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/testing/cachespeed/cachespeed_main.c
* apps/benchmarks/cachespeed/cachespeed_main.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with

View File

@ -3,27 +3,27 @@
# see the file kconfig-language.txt in the NuttX tools repository.
#
config TESTING_IOZONE
config BENCHMARK_IOZONE
tristate "IOzone, filesystem benchmark tool"
default n
---help---
https://www.iozone.org/
if TESTING_IOZONE
if BENCHMARK_IOZONE
config TESTING_IOZONE_PROGNAME
config BENCHMARK_IOZONE_PROGNAME
string "Program name"
default "iozone"
config TESTING_IOZONE_PRIORITY
config BENCHMARK_IOZONE_PRIORITY
int "IOzone task priority"
default 100
config TESTING_IOZONE_STACKSIZE
config BENCHMARK_IOZONE_STACKSIZE
int "IOzone stack size"
default 8192
config TESTING_IOZONE_VERSION
config BENCHMARK_IOZONE_VERSION
string "iozone version"
default "3_493"

View File

@ -1,5 +1,5 @@
############################################################################
# apps/testing/iozone/Make.defs
# apps/benchmarks/iozone/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@ -18,6 +18,6 @@
#
############################################################################
ifneq ($(CONFIG_TESTING_IOZONE),)
CONFIGURED_APPS += $(APPDIR)/testing/iozone
ifneq ($(CONFIG_BENCHMARK_IOZONE),)
CONFIGURED_APPS += $(APPDIR)/benchmarks/iozone
endif

View File

@ -1,5 +1,5 @@
############################################################################
# apps/testing/iozone/Make.defs
# apps/benchmarks/iozone/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@ -20,10 +20,10 @@
include $(APPDIR)/Make.defs
PROGNAME = $(CONFIG_TESTING_IOZONE_PROGNAME)
PRIORITY = $(CONFIG_TESTING_IOZONE_PRIORITY)
STACKSIZE = $(CONFIG_TESTING_IOZONE_STACKSIZE)
MODULE = $(CONFIG_TESTING_IOZONE)
PROGNAME = $(CONFIG_BENCHMARK_IOZONE_PROGNAME)
PRIORITY = $(CONFIG_BENCHMARK_IOZONE_PRIORITY)
STACKSIZE = $(CONFIG_BENCHMARK_IOZONE_STACKSIZE)
MODULE = $(CONFIG_BENCHMARK_IOZONE)
CFLAGS += -Dunix -DHAVE_ANSIC_C -DHAVE_PREAD -DNAME='"nuttx"'
CFLAGS += -DNO_MADVISE -DNO_FORK -D__FreeBSD__ -DNO_THREADS
@ -37,15 +37,15 @@ CFLAGS += -DRECLEN_START=1024
CSRCS = iozone/src/current/libbif.c
MAINSRC = iozone/src/current/iozone.c
CONFIG_TESTING_IOZONE_URL ?= "https://www.iozone.org/src/current/"
CONFIG_BENCHMARK_IOZONE_URL ?= "https://www.iozone.org/src/current/"
IOZONE_UNPACKNAME = iozone
IOZONE_VERSION = $(patsubst "%",%,$(strip $(CONFIG_TESTING_IOZONE_VERSION)))
IOZONE_VERSION = $(patsubst "%",%,$(strip $(CONFIG_BENCHMARK_IOZONE_VERSION)))
IOZONE_ZIP = iozone$(IOZONE_VERSION).tgz
$(IOZONE_ZIP):
@echo "Downloading: $(IOZONE_ZIP)"
$(Q) curl -O -L $(CONFIG_TESTING_IOZONE_URL)/$(IOZONE_ZIP)
$(Q) curl -O -L $(CONFIG_BENCHMARK_IOZONE_URL)/$(IOZONE_ZIP)
$(IOZONE_UNPACKNAME): $(IOZONE_ZIP)
@echo "Unpacking: $(IOZONE_ZIP) -> $(IOZONE_UNPACKNAME)"

View File

@ -3,20 +3,20 @@
# see the file kconfig-language.txt in the NuttX tools repository.
#
config TESTING_OSPERF
config BENCHMARK_OSPERF
tristate "System performance profiling"
default n
---help---
Measure the performance of core system functions, such as thread
switching and the time required for semaphore execution
if TESTING_OSPERF
if BENCHMARK_OSPERF
config TESTING_OSPERF_PRIORITY
config BENCHMARK_OSPERF_PRIORITY
int "OS profiling task priority"
default 100
config TESTING_OSPERF_STACKSIZE
config BENCHMARK_OSPERF_STACKSIZE
int "OS profiling stack size"
default DEFAULT_TASK_STACKSIZE

View File

@ -1,5 +1,5 @@
############################################################################
# apps/testing/superpi/Make.defs
# apps/benchmarks/osperf/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@ -18,6 +18,6 @@
#
############################################################################
ifneq ($(CONFIG_SUPERPI),)
CONFIGURED_APPS += $(APPDIR)/testing/superpi
ifneq ($(CONFIG_BENCHMARK_OSPERF),)
CONFIGURED_APPS += $(APPDIR)/benchmarks/osperf
endif

View File

@ -1,5 +1,5 @@
############################################################################
# apps/testing/osperf/Makefile
# apps/benchmarks/osperf/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@ -21,9 +21,9 @@
include $(APPDIR)/Make.defs
PROGNAME = osperf
PRIORITY = $(CONFIG_TESTING_OSPERF_PRIORITY)
STACKSIZE = $(CONFIG_TESTING_OSPERF_STACKSIZE)
MODULE = $(CONFIG_TESTING_OSPERF)
PRIORITY = $(CONFIG_BENCHMARK_OSPERF_PRIORITY)
STACKSIZE = $(CONFIG_BENCHMARK_OSPERF_STACKSIZE)
MODULE = $(CONFIG_BENCHMARK_OSPERF)
MAINSRC = osperf.c

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/testing/osperf/osperf.c
* apps/benchmarks/osperf/osperf.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -145,7 +145,7 @@ static size_t pthread_switch_performance(void)
sem_init(&perf.sem, 0, 0);
tid = performance_thread_create(pthread_switch_task, &perf,
CONFIG_TESTING_OSPERF_PRIORITY + 1);
CONFIG_BENCHMARK_OSPERF_PRIORITY + 1);
performance_start(&perf.time);
sem_post(&perf.sem);

View File

@ -3,26 +3,26 @@
# see the file kconfig-language.txt in the NuttX tools repository.
#
config TESTING_RAMSPEED
config BENCHMARK_RAMSPEED
tristate "RAM Speed Test"
default n
---help---
Enable a simple RAM speed test.
if TESTING_RAMSPEED
if BENCHMARK_RAMSPEED
config TESTING_RAMSPEED_PROGNAME
config BENCHMARK_RAMSPEED_PROGNAME
string "Program name"
default "ramspeed"
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.
config TESTING_RAMSPEED_PRIORITY
config BENCHMARK_RAMSPEED_PRIORITY
int "RAM speed test task priority"
default 100
config TESTING_RAMSPEED_STACKSIZE
config BENCHMARK_RAMSPEED_STACKSIZE
int "RAM speed test stack size"
default DEFAULT_TASK_STACKSIZE

View File

@ -1,5 +1,5 @@
############################################################################
# apps/testing/cachespeed/Make.defs
# apps/benchmarks/ramspeed/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@ -18,6 +18,6 @@
#
############################################################################
ifneq ($(CONFIG_TESTING_CACHESPEED),)
CONFIGURED_APPS += $(APPDIR)/testing/cachespeed
ifneq ($(CONFIG_BENCHMARK_RAMSPEED),)
CONFIGURED_APPS += $(APPDIR)/benchmarks/ramspeed
endif

View File

@ -1,5 +1,5 @@
############################################################################
# apps/testing/ramspeed/Makefile
# apps/benchmarks/ramspeed/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@ -22,10 +22,10 @@ include $(APPDIR)/Make.defs
# RAM speed test
PROGNAME = $(CONFIG_TESTING_RAMSPEED_PROGNAME)
PRIORITY = $(CONFIG_TESTING_RAMSPEED_PRIORITY)
STACKSIZE = $(CONFIG_TESTING_RAMSPEED_STACKSIZE)
MODULE = $(CONFIG_TESTING_RAMSPEED)
PROGNAME = $(CONFIG_BENCHMARK_RAMSPEED_PROGNAME)
PRIORITY = $(CONFIG_BENCHMARK_RAMSPEED_PRIORITY)
STACKSIZE = $(CONFIG_BENCHMARK_RAMSPEED_STACKSIZE)
MODULE = $(CONFIG_BENCHMARK_RAMSPEED)
MAINSRC = ramspeed_main.c

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/testing/ramspeed/ramspeed_main.c
* apps/benchmarks/ramspeed/ramspeed_main.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with

View File

@ -1,21 +1,21 @@
config SUPERPI
config BENCHMARK_SUPERPI
tristate "SuperPI test"
default n
if SUPERPI
if BENCHMARK_SUPERPI
config SUPERPI_PROGNAME
config BENCHMARK_SUPERPI_PROGNAME
string "Program Name"
default "pi_css5"
config SUPERPI_STACKSIZE
config BENCHMARK_SUPERPI_STACKSIZE
int "SuperPI stack size"
default DEFAULT_TASK_STACKSIZE
config SUPERPI_PRIORITY
config BENCHMARK_SUPERPI_PRIORITY
int "Task PRIORITY"
default 100
---help---
The higher the priority value, the lower the priority.
endif # SUPERPI
endif # BENCHMARK_SUPERPI

View File

@ -1,5 +1,5 @@
############################################################################
# apps/testing/ramspeed/Make.defs
# apps/benchmarks/superpi/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@ -18,6 +18,6 @@
#
############################################################################
ifneq ($(CONFIG_TESTING_RAMSPEED),)
CONFIGURED_APPS += $(APPDIR)/testing/ramspeed
ifneq ($(CONFIG_BENCHMARK_SUPERPI),)
CONFIGURED_APPS += $(APPDIR)/benchmarks/superpi
endif

View File

@ -1,5 +1,5 @@
############################################################################
# apps/testing/superpi/Makefile
# apps/benchmarks/superpi/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@ -27,10 +27,10 @@ SUPERPI_ZIP = $(SUPERPI_VERSION).zip
UNPACK ?= unzip -q -o
CSRCS += superpi/fftsg_h.c
PROGNAME = $(CONFIG_SUPERPI_PROGNAME)
PRIORITY = $(CONFIG_SUPERPI_PRIORITY)
STACKSIZE = $(CONFIG_SUPERPI_STACKSIZE)
MODULE = $(CONFIG_SUPERPI)
PROGNAME = $(CONFIG_BENCHMARK_SUPERPI_PROGNAME)
PRIORITY = $(CONFIG_BENCHMARK_SUPERPI_PRIORITY)
STACKSIZE = $(CONFIG_BENCHMARK_SUPERPI_STACKSIZE)
MODULE = $(CONFIG_BENCHMARK_SUPERPI)
MAINSRC = superpi/pi_fftcs.c
$(SUPERPI_ZIP):