| 
    Zephyr Project API
    3.3.0
    
   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.  More... | |
| #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()  More... | |
| void | busy_loop (uint32_t ticks) | 
| Busy wait for specified number of ticks.  More... | |
| ZTEST (usage_api, test_all_stats_usage) | |
| Test the k_threads_runtime_stats_all_get() API.  More... | |
| ZTEST (usage_api, test_thread_stats_enable_disable) | |
| ZTEST (usage_api, test_sys_stats_enable_disable) | |
| void | resume_main (struct k_timer *timer) | 
| Timer handler to resume the main thread.  More... | |
| ZTEST (usage_api, test_thread_stats_usage) | |
| Test the k_thread_runtime_stats_get() API.  More... | |
| 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.
| ZTEST | ( | usage_api | , | 
| test_all_stats_usage | |||
| ) | 
Test the k_threads_runtime_stats_all_get() API.
| ZTEST | ( | usage_api | , | 
| test_sys_stats_enable_disable | |||
| ) | 
| ZTEST | ( | usage_api | , | 
| test_thread_stats_enable_disable | |||
| ) | 
| ZTEST | ( | usage_api | , | 
| test_thread_stats_usage | |||
| ) | 
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 |