Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Run userspace-enabled benchmark timing tests:
$ sanitycheck --device-testing --device-serial /dev/ttyACM0 -p frdm_k64f --test tests/benchmarks/timing_info/benchmark.timing.userspace
# Print the results
$ cat sanity-out/frdm_k64f/tests/benchmarks/timing_info/benchmark.timing.userspace/handler.log
***** Booting Zephyr OS v1.13.0-rc1 *****
starting test - Time Measurement
Timing Results: Clock Frequency: 120 MHz
Context switch : 860 cycles , 7166 ns
Interrupt latency : 0 cycles , 0 ns
Tick overhead : 166 cycles , 1383 ns
Thread Creation : 845 cycles , 7041 ns
Thread cancel : 636 cycles , 5300 ns
Thread abort :1565 cycles , 13041 ns
Thread Suspend :1215 cycles , 10125 ns
Thread Resume :1210 cycles , 10083 ns
Thread Yield :1138 cycles , 9483 ns
Thread Sleep :1210 cycles , 10083 ns
Heap Malloc : 848 cycles , 7066 ns
Heap Free : 772 cycles , 6433 ns
Semaphore Take with context switch :1350 cycles , 11250 ns
Semaphore Give with context switch :1360 cycles , 11333 ns
Semaphore Take without context switch : 108 cycles , 900 ns
Semaphore Give without context switch : 215 cycles , 1791 ns
Mutex lock : 243 cycles , 2025 ns
Mutex unlock : 326 cycles , 2716 ns
Message Queue Put with context switch :1455 cycles , 12125 ns
Message Queue Put without context switch : 310 cycles , 2583 ns
Message Queue get with context switch :1560 cycles , 13000 ns
Message Queue get without context switch : 305 cycles , 2541 ns
MailBox synchronous put :1600 cycles , 13333 ns
MailBox synchronous get :1560 cycles , 13000 ns
MailBox asynchronous put : 420 cycles , 3500 ns
MailBox get without context switch : 710 cycles , 5916 ns
Drop to user mode :1745 cycles , 14541 ns
User thread Creation :2504 cycles , 20866 ns
Syscall overhead : 178 cycles , 1483 ns
Validation overhead k object init : 301 cycles , 2508 ns
Validation overhead k object permission : 285 cycles , 2375 ns
Timing Measurement finished
PASS - main
===================================================================
===================================================================
PROJECT EXECUTION SUCCESSFUL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.