Page 1 of 1

statistic module (Thread statistics)

Posted: Fri Oct 15, 2021 7:45 am
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

Re: statistic module (Thread statistics)

Posted: Fri Oct 15, 2021 7:52 am
by Giovanni
Hi,

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

Giovanni

Re: statistic module (Thread statistics)

Posted: Fri Oct 15, 2021 7:58 am
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

Re: statistic module (Thread statistics)

Posted: Fri Oct 15, 2021 8:53 am
by Giovanni
"best = shortest measurement
"worst" = longer measurement