|
Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
|
#include <zephyr/ztest.h>Macros | |
| #define | HELPER_STACK_SIZE 500 |
| #define | TEST_WITHIN_X_PERCENT(val1, val2, pcnt) |
| Verify va1 and val2 are within pcnt % of each other. | |
| #define | IDLE_EVENT_STATS_PRECISION 1 |
Functions | |
| static | K_THREAD_STACK_DEFINE (helper_stack, 500) |
| void | helper1 (void *p1, void *p2, void *p3) |
| Helper thread to test_thread_runtime_stats_get() | |
| void | busy_loop (uint32_t ticks) |
| Busy wait for specified number of ticks. | |
| void | test_all_stats_usage (void) |
| Test the k_threads_runtime_stats_all_get() API. | |
| void | test_thread_stats_enable_disable (void) |
| void | test_sys_stats_enable_disable (void) |
| void | resume_main (struct k_timer *timer) |
| Timer handler to resume the main thread. | |
| void | test_thread_stats_usage (void) |
| Test the k_thread_runtime_stats_get() API. | |
| ZTEST_SUITE (usage_api, NULL, NULL, ztest_simple_1cpu_before, ztest_simple_1cpu_after, NULL) | |
Variables | |
| static struct k_thread | helper_thread |
| static struct k_thread * | main_thread |
| #define HELPER_STACK_SIZE 500 |
| #define IDLE_EVENT_STATS_PRECISION 1 |
| #define TEST_WITHIN_X_PERCENT | ( | val1, | |
| val2, | |||
| pcnt ) |
| void busy_loop | ( | uint32_t | ticks | ) |
Busy wait for specified number of ticks.
| void helper1 | ( | void * | p1, |
| void * | p2, | ||
| void * | p3 ) |
Helper thread to test_thread_runtime_stats_get()
|
static |
| void resume_main | ( | struct k_timer * | timer | ) |
Timer handler to resume the main thread.
| void test_all_stats_usage | ( | void | ) |
Test the k_threads_runtime_stats_all_get() API.
| void test_sys_stats_enable_disable | ( | void | ) |
| void test_thread_stats_enable_disable | ( | void | ) |
| void test_thread_stats_usage | ( | void | ) |
Test the k_thread_runtime_stats_get() API.
This routine tests the k_thread_runtime_stats_get() routine. It verifies that the contents of the fields guarded by CONFIG_SCHED_THREAD_USAGE are correct.
| ZTEST_SUITE | ( | usage_api | , |
| NULL | , | ||
| NULL | , | ||
| ztest_simple_1cpu_before | , | ||
| ztest_simple_1cpu_after | , | ||
| NULL | ) |
|
static |
|
static |