zephyr/tests/legacy/benchmark/app_kernel
David B. Kinder ac74d8b652 license: Replace Apache boilerplate with SPDX tag
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.

Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.

Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file.  Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.

Jira: ZEP-1457

Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-19 03:50:58 +00:00
..
src license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
Makefile tests: introduce Makefile.test 2017-01-03 17:48:44 +00:00
README.txt kernel: Eliminate use of KERNEL_V2 configuration option 2016-11-12 12:04:39 +00:00
prj.mdef tests: move benchmark tests to legacy/ 2016-11-01 19:23:48 +00:00
prj_fp.conf kernel: add LEGACY_KERNEL option 2017-01-09 19:42:13 +00:00
prj_no_fp.conf kernel: add LEGACY_KERNEL option 2017-01-09 19:42:13 +00:00
testcase.ini samples: tests: tag all legacy test cases and samples 2016-11-30 21:45:22 +00:00

README.txt

Title: Microkernel Object Performance

Description:

AppKernel is used to measure the performance of microkernel events, mutexes,
semaphores, FIFOs, mailboxes, pipes, memory maps, and memory pools.

--------------------------------------------------------------------------------

Building and Running Project:

This microkernel project outputs to the console. It can be built and executed
on QEMU as follows:

    make qemu

--------------------------------------------------------------------------------

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

--------------------------------------------------------------------------------

Sample Output:

|-----------------------------------------------------------------------------|
|          S I M P L E   S E R V I C E    M E A S U R E M E N T S  |  nsec    |
|-----------------------------------------------------------------------------|
|-----------------------------------------------------------------------------|
| enqueue 1 byte msg in FIFO                                       |    NNNNNN|
| dequeue 1 byte msg in FIFO                                       |    NNNNNN|
| enqueue 4 bytes msg in FIFO                                      |    NNNNNN|
| dequeue 4 bytes msg in FIFO                                      |    NNNNNN|
| enqueue 1 byte msg in FIFO to a waiting higher priority task     |    NNNNNN|
| enqueue 4 bytes in FIFO to a waiting higher priority task        |    NNNNNN|
|-----------------------------------------------------------------------------|
| signal semaphore                                                 |    NNNNNN|
| signal to waiting high pri task                                  |    NNNNNN|
| signal to waiting high pri task, with timeout                    |    NNNNNN|
| signal to waitm (2)                                              |    NNNNNN|
| signal to waitm (2), with timeout                                |    NNNNNN|
| signal to waitm (3)                                              |    NNNNNN|
| signal to waitm (3), with timeout                                |   NNNNNNN|
| signal to waitm (4)                                              |   NNNNNNN|
| signal to waitm (4), with timeout                                |   NNNNNNN|
|-----------------------------------------------------------------------------|
| average lock and unlock mutex                                    |    NNNNNN|
|-----------------------------------------------------------------------------|
| average alloc and dealloc memory page                            |    NNNNNN|
|-----------------------------------------------------------------------------|
| average alloc and dealloc memory pool block                      |    NNNNNN|
|-----------------------------------------------------------------------------|
| Signal enabled event                                             |    NNNNNN|
| Signal event & Test event                                        |    NNNNNN|
| Signal event & TestW event                                       |    NNNNNN|
| Signal event with installed handler                                         |
|    Handler responds OK                                                      |
|-----------------------------------------------------------------------------|
|                M A I L B O X   M E A S U R E M E N T S                      |
|-----------------------------------------------------------------------------|
| Send mailbox message to waiting high priority task and wait                 |
| repeat for  128 times and take the average                                  |
|-----------------------------------------------------------------------------|
|   size(B) |       time/packet (nsec)       |          KB/sec                |
|-----------------------------------------------------------------------------|
|          N|                          NNNNNN|                               N|
|          N|                          NNNNNN|                              NN|
|         NN|                          NNNNNN|                              NN|
|         NN|                          NNNNNN|                              NN|
|         NN|                          NNNNNN|                              NN|
|        NNN|                          NNNNNN|                             NNN|
|        NNN|                          NNNNNN|                             NNN|
|        NNN|                          NNNNNN|                             NNN|
|       NNNN|                         NNNNNNN|                             NNN|
|       NNNN|                         NNNNNNN|                            NNNN|
|       NNNN|                         NNNNNNN|                            NNNN|
|       NNNN|                         NNNNNNN|                            NNNN|
|-----------------------------------------------------------------------------|
| message overhead:      NNNNNN     nsec/packet                               |
| raw transfer rate:           NNNN KB/sec (without overhead)                 |
|-----------------------------------------------------------------------------|
|                   P I P E   M E A S U R E M E N T S                         |
|-----------------------------------------------------------------------------|
| Send data into a pipe towards a receiving high priority task and wait       |
|-----------------------------------------------------------------------------|
|                          matching sizes (_ALL_N)                            |
|-----------------------------------------------------------------------------|
|   size(B) |       time/packet (nsec)       |          KB/sec                |
|-----------------------------------------------------------------------------|
| put | get |  no buf  | small buf| big buf  |  no buf  | small buf| big buf  |
|-----------------------------------------------------------------------------|
|    N|    N|   NNNNNNN|   NNNNNNN|   NNNNNNN|         N|         N|         N|
|   NN|   NN|   NNNNNNN|   NNNNNNN|   NNNNNNN|        NN|        NN|        NN|
|   NN|   NN|   NNNNNNN|   NNNNNNN|   NNNNNNN|        NN|        NN|        NN|
|   NN|   NN|   NNNNNNN|   NNNNNNN|   NNNNNNN|        NN|        NN|        NN|
|  NNN|  NNN|   NNNNNNN|   NNNNNNN|   NNNNNNN|        NN|        NN|        NN|
|  NNN|  NNN|   NNNNNNN|   NNNNNNN|   NNNNNNN|       NNN|       NNN|       NNN|
|  NNN|  NNN|   NNNNNNN|   NNNNNNN|   NNNNNNN|       NNN|       NNN|       NNN|
| NNNN| NNNN|   NNNNNNN|   NNNNNNN|   NNNNNNN|       NNN|       NNN|       NNN|
| NNNN| NNNN|   NNNNNNN|   NNNNNNN|   NNNNNNN|       NNN|       NNN|       NNN|
| NNNN| NNNN|   NNNNNNN|   NNNNNNN|   NNNNNNN|      NNNN|      NNNN|      NNNN|
|-----------------------------------------------------------------------------|
|                      non-matching sizes (1_TO_N) to higher priority         |
|-----------------------------------------------------------------------------|
|   size(B) |       time/packet (nsec)       |          KB/sec                |
|-----------------------------------------------------------------------------|
| put | get |  no buf  | small buf| big buf  |  no buf  | small buf| big buf  |
|-----------------------------------------------------------------------------|
|    N| NNNN|   NNNNNNN|   NNNNNNN|   NNNNNNN|         N|         N|         N|
|   NN| NNNN|   NNNNNNN|   NNNNNNN|   NNNNNNN|        NN|        NN|        NN|
|   NN| NNNN|   NNNNNNN|   NNNNNNN|   NNNNNNN|        NN|        NN|        NN|
|   NN|  NNN|   NNNNNNN|   NNNNNNN|   NNNNNNN|        NN|        NN|        NN|
|  NNN|  NNN|   NNNNNNN|   NNNNNNN|   NNNNNNN|        NN|        NN|        NN|
|  NNN|  NNN|   NNNNNNN|   NNNNNNN|   NNNNNNN|        NN|        NN|        NN|
|  NNN|   NN|  NNNNNNNN|   NNNNNNN|   NNNNNNN|        NN|        NN|        NN|
| NNNN|   NN|  NNNNNNNN|  NNNNNNNN|  NNNNNNNN|        NN|        NN|        NN|
| NNNN|   NN| NNNNNNNNN| NNNNNNNNN| NNNNNNNNN|        NN|        NN|        NN|
| NNNN|    N| NNNNNNNNN| NNNNNNNNN| NNNNNNNNN|         N|         N|         N|
|-----------------------------------------------------------------------------|
|                      non-matching sizes (1_TO_N) to lower priority          |
|-----------------------------------------------------------------------------|
|   size(B) |       time/packet (nsec)       |          KB/sec                |
|-----------------------------------------------------------------------------|
| put | get |  no buf  | small buf| big buf  |  no buf  | small buf| big buf  |
|-----------------------------------------------------------------------------|
|    N| NNNN|   NNNNNNN|    NNNNNN|    NNNNNN|         N|         N|         N|
|   NN| NNNN|   NNNNNNN|   NNNNNNN|    NNNNNN|        NN|        NN|        NN|
|   NN| NNNN|   NNNNNNN|   NNNNNNN|    NNNNNN|        NN|        NN|        NN|
|   NN|  NNN|   NNNNNNN|   NNNNNNN|    NNNNNN|        NN|        NN|        NN|
|  NNN|  NNN|   NNNNNNN|   NNNNNNN|   NNNNNNN|        NN|        NN|       NNN|
|  NNN|  NNN|   NNNNNNN|   NNNNNNN|   NNNNNNN|        NN|        NN|       NNN|
|  NNN|   NN|  NNNNNNNN|  NNNNNNNN|   NNNNNNN|        NN|        NN|       NNN|
| NNNN|   NN|  NNNNNNNN|  NNNNNNNN|   NNNNNNN|        NN|        NN|       NNN|
| NNNN|   NN| NNNNNNNNN| NNNNNNNNN|   NNNNNNN|        NN|         N|       NNN|
| NNNN|    N| NNNNNNNNN|NNNNNNNNNN|   NNNNNNN|         N|         N|      NNNN|
|-----------------------------------------------------------------------------|
|         END OF TESTS                                                        |
|-----------------------------------------------------------------------------|
PROJECT EXECUTION SUCCESSFUL