zephyr/tests/benchmarks/latency_measure
Nazar Kazakov f483b1bc4c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-18 13:24:08 -04:00
..
boards soc: arm: microchip_mec: mec1501: remove SOC_POWER_MANAGEMENT 2022-03-04 09:05:45 -06:00
src everywhere: fix typos 2022-03-18 13:24:08 -04:00
CMakeLists.txt cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
README.rst tests/benchmarks: add dynamic memory allocation measurement 2021-07-21 10:16:56 +03:00
prj.conf tests/benchmarks: add dynamic memory allocation measurement 2021-07-21 10:16:56 +03:00
testcase.yaml tests: latency_measure: remove qemu_x86_64 exclusion 2021-11-24 14:16:13 -05:00

README.rst

Latency Measurements
####################

This benchmark measures the latency of selected kernel capabilities, including:


* Measure time to switch from ISR back to interrupted thread
* Measure time from ISR to executing a different thread (rescheduled)
* Measure average time to signal a semaphore then test that semaphore
* Measure average time to signal a semaphore then test that semaphore with a context switch
* Measure average time to lock a mutex then unlock that mutex
* Measure average context switch time between threads using (k_yield)
* Measure average context switch time between threads (coop)
* Time it takes to suspend a thread
* Time it takes to resume a suspended thread
* Time it takes to create a new thread (without starting it)
* Time it takes to start a newly created thread
* Measure average time to alloc memory from heap then free that memory


Sample output of the benchmark::

        *** Booting Zephyr OS build zephyr-v2.6.0-1119-g378a1e082ac5  ***
        START - Time Measurement
        Timing results: Clock frequency: 1000 MHz
        Average thread context switch using yield                   :    9060 cycles ,     9060 ns
        Average context switch time between threads (coop)          :    9503 cycles ,     9503 ns
        Switch from ISR back to interrupted thread                  :   14208 cycles ,    14208 ns
        Time from ISR to executing a different thread               :    9664 cycles ,     9664 ns
        Time to create a thread (without start)                     :    3968 cycles ,     3968 ns
        Time to start a thread                                      :   12064 cycles ,    12064 ns
        Time to suspend a thread                                    :   12640 cycles ,    12640 ns
        Time to resume a thread                                     :   12096 cycles ,    12096 ns
        Time to abort a thread (not running)                        :    2208 cycles ,     2208 ns
        Average semaphore signal time                               :    8928 cycles ,     8928 ns
        Average semaphore test time                                 :    2048 cycles ,     2048 ns
        Semaphore take time (context switch)                        :   13472 cycles ,    13472 ns
        Semaphore give time (context switch)                        :   18400 cycles ,    18400 ns
        Average time to lock a mutex                                :    3072 cycles ,     3072 ns
        Average time to unlock a mutex                              :    9251 cycles ,     9251 ns
        Average time for heap malloc                                :   13056 cycles ,    13056 ns
        Average time for heap free                                  :    7776 cycles ,     7776 ns
        ===================================================================
        PROJECT EXECUTION SUCCESSFUL