TNeo  BETA v1.08-11-g97e5a6d
Data Fields
TN_TaskTiming Struct Reference

Detailed Description

Timing structure that is managed by profiler and can be read by tn_task_profiler_timing_get() function.

This structure is contained in each struct TN_Task structure.

Available if only TN_PROFILER option is non-zero, also depends on TN_PROFILER_WAIT_TIME.

Definition at line 254 of file tn_tasks.h.

Data Fields

unsigned long long total_run_time
 Total time when task was running. More...
 
unsigned long long got_running_cnt
 How many times task got running. More...
 
unsigned long max_consecutive_run_time
 Maximum consecutive time task was running.
 
unsigned long long total_wait_time [TN_WAIT_REASONS_CNT]
 Available if only TN_PROFILER_WAIT_TIME option is non-zero. More...
 
unsigned long max_consecutive_wait_time [TN_WAIT_REASONS_CNT]
 Available if only TN_PROFILER_WAIT_TIME option is non-zero. More...
 

Field Documentation

◆ total_run_time

unsigned long long TN_TaskTiming::total_run_time

Total time when task was running.

Attention
This is NOT the time that task was in RUNNABLE state: if task A is preempted by high-priority task B, task A is not running, but is still in the RUNNABLE state. This counter represents the time task was actually running.

Definition at line 263 of file tn_tasks.h.

◆ got_running_cnt

unsigned long long TN_TaskTiming::got_running_cnt

How many times task got running.

It is useful to find an average value of consecutive running time: (total_run_time / got_running_cnt)

Definition at line 267 of file tn_tasks.h.

◆ total_wait_time

unsigned long long TN_TaskTiming::total_wait_time[TN_WAIT_REASONS_CNT]

Available if only TN_PROFILER_WAIT_TIME option is non-zero.

Total time when task was not running; time is broken down by reasons of waiting.

For example, to get the time task was waiting for mutexes with priority inheritance protocol, use: total_wait_time[ TN_WAIT_REASON_MUTEX_I ]

To get the time task was runnable but preempted by another task, use: total_wait_time[ TN_WAIT_REASON_NONE ]

Definition at line 285 of file tn_tasks.h.

◆ max_consecutive_wait_time

unsigned long TN_TaskTiming::max_consecutive_wait_time[TN_WAIT_REASONS_CNT]

Available if only TN_PROFILER_WAIT_TIME option is non-zero.

Maximum consecutive time task was not running; time is broken down by reasons of waiting.

See also
total_wait_time

Definition at line 293 of file tn_tasks.h.


The documentation for this struct was generated from the following file: