X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=steadystate.h;h=f390b073eec564b015519d0626d0baeb981705b0;hp=3829ee412e95ae763a65b83ac6729b87f57ce661;hb=11e955e32698870b9da0414c778346f7377a8119;hpb=ad743db401637bd503d0466c94f735d92248be79 diff --git a/steadystate.h b/steadystate.h index 3829ee41..f390b073 100644 --- a/steadystate.h +++ b/steadystate.h @@ -1,35 +1,33 @@ #ifndef FIO_STEADYSTATE_H #define FIO_STEADYSTATE_H +#include "stat.h" #include "thread_options.h" +#include "lib/ieee754.h" extern void steadystate_check(void); extern void steadystate_setup(void); -extern void td_steadystate_init(struct thread_data *); +extern int td_steadystate_init(struct thread_data *); +extern unsigned long long steadystate_bw_mean(struct thread_stat *); +extern unsigned long long steadystate_iops_mean(struct thread_stat *); extern bool steadystate_enabled; -/* - * For steady state detection - */ struct steadystate_data { double limit; unsigned long long dur; unsigned long long ramp_time; - bool pct; - unsigned int mode; - int last_in_group; - int ramp_time_over; + uint32_t state; unsigned int head; unsigned int tail; - unsigned long *iops_data; - unsigned long *bw_data; + uint64_t *iops_data; + uint64_t *bw_data; double slope; - double criterion; double deviation; + double criterion; unsigned long long sum_y; unsigned long long sum_x; @@ -47,6 +45,10 @@ enum { __FIO_SS_BW = 2, __FIO_SS_SLOPE = 4, __FIO_SS_ATTAINED = 8, + __FIO_SS_RAMP_OVER = 16, + __FIO_SS_DATA = 32, + __FIO_SS_PCT = 64, + __FIO_SS_BUFFER_FULL = 128, FIO_SS_IOPS = __FIO_SS_IOPS, FIO_SS_IOPS_SLOPE = __FIO_SS_IOPS | __FIO_SS_SLOPE,