2015-08-15 02:13:25 +08:00
|
|
|
Title: Nanokernel Object Performance
|
2015-04-11 07:44:37 +08:00
|
|
|
|
|
|
|
Description:
|
|
|
|
|
2015-06-10 03:38:18 +08:00
|
|
|
The SysKernel test measures the performance of the nanokernel's semaphore,
|
|
|
|
lifo, fifo and stack objects.
|
2015-04-11 07:44:37 +08:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
Building and Running Project:
|
|
|
|
|
|
|
|
This microkernel project outputs to the console. It can be built and executed
|
|
|
|
on QEMU as follows:
|
|
|
|
|
2015-06-06 09:48:58 +08:00
|
|
|
make qemu
|
2015-04-11 07:44:37 +08:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
2015-06-01 22:30:09 +08:00
|
|
|
|
|
|
|
Troubleshooting:
|
|
|
|
|
|
|
|
Problems caused by out-dated project information can be addressed by
|
|
|
|
issuing one of the following commands then rebuilding the project:
|
|
|
|
|
|
|
|
make clean # discard results of previous builds
|
|
|
|
# but keep existing configuration info
|
|
|
|
or
|
|
|
|
make pristine # discard results of previous builds
|
|
|
|
# and restore pre-defined configuration info
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
2015-04-11 07:44:37 +08:00
|
|
|
|
|
|
|
Sample Output:
|
|
|
|
|
|
|
|
MODULE: Nanokernel API test
|
|
|
|
KERNEL VERSION: <varies>
|
|
|
|
|
|
|
|
Each test below are repeated 5000 times and the average
|
|
|
|
time for one iteration is displayed.
|
|
|
|
|
2015-06-10 03:38:18 +08:00
|
|
|
TEST CASE: Semaphore #1
|
2016-04-09 18:32:09 +08:00
|
|
|
TEST COVERAGE:
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_sem_init
|
2015-12-19 04:36:34 +08:00
|
|
|
nano_fiber_sem_take(TICKS_UNLIMITED)
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_fiber_sem_give
|
|
|
|
Starting test. Please wait...
|
2015-04-11 07:44:37 +08:00
|
|
|
TEST RESULT: SUCCESSFUL
|
2015-06-10 03:38:18 +08:00
|
|
|
DETAILS: Average time for 1 iteration: NNNN nSec
|
2015-04-11 07:44:37 +08:00
|
|
|
END TEST CASE
|
|
|
|
|
2015-06-10 03:38:18 +08:00
|
|
|
TEST CASE: Semaphore #2
|
2016-04-09 18:32:09 +08:00
|
|
|
TEST COVERAGE:
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_sem_init
|
2015-12-19 04:36:34 +08:00
|
|
|
nano_fiber_sem_take(TICKS_NONE)
|
2015-06-10 03:38:18 +08:00
|
|
|
fiber_yield
|
|
|
|
nano_fiber_sem_give
|
|
|
|
Starting test. Please wait...
|
2015-04-11 07:44:37 +08:00
|
|
|
TEST RESULT: SUCCESSFUL
|
2015-06-10 03:38:18 +08:00
|
|
|
DETAILS: Average time for 1 iteration: NNNN nSec
|
2015-04-11 07:44:37 +08:00
|
|
|
END TEST CASE
|
|
|
|
|
2015-06-10 03:38:18 +08:00
|
|
|
TEST CASE: Semaphore #3
|
2016-04-09 18:32:09 +08:00
|
|
|
TEST COVERAGE:
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_sem_init
|
2015-12-19 04:36:34 +08:00
|
|
|
nano_fiber_sem_take(TICKS_UNLIMITED)
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_fiber_sem_give
|
|
|
|
nano_task_sem_give
|
2015-12-19 04:36:34 +08:00
|
|
|
nano_task_sem_take(TICKS_UNLIMITED)
|
2015-06-10 03:38:18 +08:00
|
|
|
Starting test. Please wait...
|
2015-04-11 07:44:37 +08:00
|
|
|
TEST RESULT: SUCCESSFUL
|
2015-06-10 03:38:18 +08:00
|
|
|
DETAILS: Average time for 1 iteration: NNNN nSec
|
2015-04-11 07:44:37 +08:00
|
|
|
END TEST CASE
|
|
|
|
|
2015-06-10 03:38:18 +08:00
|
|
|
TEST CASE: LIFO #1
|
2016-04-09 18:32:09 +08:00
|
|
|
TEST COVERAGE:
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_lifo_init
|
2015-12-18 02:25:17 +08:00
|
|
|
nano_fiber_lifo_get(TICKS_UNLIMITED)
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_fiber_lifo_put
|
|
|
|
Starting test. Please wait...
|
2015-04-11 07:44:37 +08:00
|
|
|
TEST RESULT: SUCCESSFUL
|
2015-06-10 03:38:18 +08:00
|
|
|
DETAILS: Average time for 1 iteration: NNNN nSec
|
2015-04-11 07:44:37 +08:00
|
|
|
END TEST CASE
|
|
|
|
|
2015-06-10 03:38:18 +08:00
|
|
|
TEST CASE: LIFO #2
|
2016-04-09 18:32:09 +08:00
|
|
|
TEST COVERAGE:
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_lifo_init
|
2015-12-18 02:25:17 +08:00
|
|
|
nano_fiber_lifo_get(TICKS_UNLIMITED)
|
|
|
|
nano_fiber_lifo_get(TICKS_NONE)
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_fiber_lifo_put
|
|
|
|
fiber_yield
|
|
|
|
Starting test. Please wait...
|
2015-04-11 07:44:37 +08:00
|
|
|
TEST RESULT: SUCCESSFUL
|
2015-06-10 03:38:18 +08:00
|
|
|
DETAILS: Average time for 1 iteration: NNNN nSec
|
2015-04-11 07:44:37 +08:00
|
|
|
END TEST CASE
|
|
|
|
|
2015-06-10 03:38:18 +08:00
|
|
|
TEST CASE: LIFO #3
|
2016-04-09 18:32:09 +08:00
|
|
|
TEST COVERAGE:
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_lifo_init
|
2015-12-18 02:25:17 +08:00
|
|
|
nano_fiber_lifo_get(TICKS_UNLIMITED)
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_fiber_lifo_put
|
2015-12-18 02:25:17 +08:00
|
|
|
nano_task_lifo_get(TICKS_UNLIMITED)
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_task_lifo_put
|
|
|
|
Starting test. Please wait...
|
2015-04-11 07:44:37 +08:00
|
|
|
TEST RESULT: SUCCESSFUL
|
2015-06-10 03:38:18 +08:00
|
|
|
DETAILS: Average time for 1 iteration: NNNN nSec
|
2015-04-11 07:44:37 +08:00
|
|
|
END TEST CASE
|
|
|
|
|
2015-06-10 03:38:18 +08:00
|
|
|
TEST CASE: FIFO #1
|
2016-04-09 18:32:09 +08:00
|
|
|
TEST COVERAGE:
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_fifo_init
|
2015-12-12 00:46:40 +08:00
|
|
|
nano_fiber_fifo_get
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_fiber_fifo_put
|
|
|
|
Starting test. Please wait...
|
2015-04-11 07:44:37 +08:00
|
|
|
TEST RESULT: SUCCESSFUL
|
2015-06-10 03:38:18 +08:00
|
|
|
DETAILS: Average time for 1 iteration: NNNN nSec
|
2015-04-11 07:44:37 +08:00
|
|
|
END TEST CASE
|
|
|
|
|
2015-06-10 03:38:18 +08:00
|
|
|
TEST CASE: FIFO #2
|
2016-04-09 18:32:09 +08:00
|
|
|
TEST COVERAGE:
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_fifo_init
|
2015-12-12 00:46:40 +08:00
|
|
|
nano_fiber_fifo_get(TICKS_UNLIMITED)
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_fiber_fifo_get
|
|
|
|
nano_fiber_fifo_put
|
|
|
|
fiber_yield
|
|
|
|
Starting test. Please wait...
|
2015-04-11 07:44:37 +08:00
|
|
|
TEST RESULT: SUCCESSFUL
|
2015-06-10 03:38:18 +08:00
|
|
|
DETAILS: Average time for 1 iteration: NNNN nSec
|
2015-04-11 07:44:37 +08:00
|
|
|
END TEST CASE
|
|
|
|
|
2015-06-10 03:38:18 +08:00
|
|
|
TEST CASE: FIFO #3
|
2016-04-09 18:32:09 +08:00
|
|
|
TEST COVERAGE:
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_fifo_init
|
2015-12-12 00:46:40 +08:00
|
|
|
nano_fiber_fifo_get
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_fiber_fifo_put
|
2015-12-12 00:46:40 +08:00
|
|
|
nano_task_fifo_get
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_task_fifo_put
|
|
|
|
Starting test. Please wait...
|
2015-04-11 07:44:37 +08:00
|
|
|
TEST RESULT: SUCCESSFUL
|
2015-06-10 03:38:18 +08:00
|
|
|
DETAILS: Average time for 1 iteration: NNNN nSec
|
2015-04-11 07:44:37 +08:00
|
|
|
END TEST CASE
|
|
|
|
|
2015-06-10 03:38:18 +08:00
|
|
|
TEST CASE: Stack #1
|
2016-04-09 18:32:09 +08:00
|
|
|
TEST COVERAGE:
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_stack_init
|
2015-12-22 03:40:12 +08:00
|
|
|
nano_fiber_stack_pop(TICKS_UNLIMITED)
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_fiber_stack_push
|
|
|
|
Starting test. Please wait...
|
2015-04-11 07:44:37 +08:00
|
|
|
TEST RESULT: SUCCESSFUL
|
2015-06-10 03:38:18 +08:00
|
|
|
DETAILS: Average time for 1 iteration: NNNN nSec
|
2015-04-11 07:44:37 +08:00
|
|
|
END TEST CASE
|
|
|
|
|
2015-06-10 03:38:18 +08:00
|
|
|
TEST CASE: Stack #2
|
2016-04-09 18:32:09 +08:00
|
|
|
TEST COVERAGE:
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_stack_init
|
2015-12-22 03:40:12 +08:00
|
|
|
nano_fiber_stack_pop(TICKS_UNLIMITED)
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_fiber_stack_pop
|
|
|
|
nano_fiber_stack_push
|
|
|
|
fiber_yield
|
|
|
|
Starting test. Please wait...
|
2015-04-11 07:44:37 +08:00
|
|
|
TEST RESULT: SUCCESSFUL
|
2015-06-10 03:38:18 +08:00
|
|
|
DETAILS: Average time for 1 iteration: NNNN nSec
|
2015-04-11 07:44:37 +08:00
|
|
|
END TEST CASE
|
|
|
|
|
2015-06-10 03:38:18 +08:00
|
|
|
TEST CASE: Stack #3
|
2016-04-09 18:32:09 +08:00
|
|
|
TEST COVERAGE:
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_stack_init
|
2015-12-22 03:40:12 +08:00
|
|
|
nano_fiber_stack_pop(TICKS_UNLIMITED)
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_fiber_stack_push
|
2015-12-22 03:40:12 +08:00
|
|
|
nano_task_stack_pop(TICKS_UNLIMITED)
|
2015-06-10 03:38:18 +08:00
|
|
|
nano_task_stack_push
|
|
|
|
Starting test. Please wait...
|
2015-04-11 07:44:37 +08:00
|
|
|
TEST RESULT: SUCCESSFUL
|
2015-06-10 03:38:18 +08:00
|
|
|
DETAILS: Average time for 1 iteration: NNNN nSec
|
2015-04-11 07:44:37 +08:00
|
|
|
END TEST CASE
|
|
|
|
|
2015-06-05 20:24:47 +08:00
|
|
|
PROJECT EXECUTION SUCCESSFUL
|