statistic module (Thread statistics)

Discussions and support about ChibiOS/RT, the free embedded RTOS.
Post Reply
albert9
Posts: 2
Joined: Thu Oct 14, 2021 1:46 am

statistic module (Thread statistics)

Post by albert9 »

Hi all ,

I am using the thread statistics to derive the CPU load.

Under the
typedef struct {
rtcnt_t best; /**< @brief Best measurement. */
rtcnt_t worst; /**< @brief Worst measurement. */
rtcnt_t last; /**< @brief Last measurement. */
ucnt_t n; /**< @brief Number of measurements. */
rttime_t cumulative; /**< @brief Cumulative measurement. */
} time_measurement_t;

What does best / worst Measurement means ?
last measurement means the most recent measurement ?

Appreciate if one could explain.
thank you

Best Regards
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: statistic module (Thread statistics)

Post by Giovanni »

Hi,

last = last performed measurement
worst - worst measurement performed
best - best measurement performed
cumulative - sum of all measurements

Giovanni
albert9
Posts: 2
Joined: Thu Oct 14, 2021 1:46 am

Re: statistic module (Thread statistics)

Post by albert9 »

Giovanni wrote:Hi,

last = last performed measurement
worst - worst measurement performed
best - best measurement performed
cumulative - sum of all measurements

Giovanni


Hi Sir,

So when saying best , you mean most accurate ? or you mean shortest time ? I am interested in the definition what it means by best.

Best Regards
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: statistic module (Thread statistics)

Post by Giovanni »

"best = shortest measurement
"worst" = longer measurement
Post Reply