X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=steadystate.h;h=20ccd3035f11d67ca751d78be6135be85517d6e0;hp=a23c45ba9efff266891eaecbe5c050d888e471e1;hb=84af30a1ed4db246621813e7fc3a41e21cef52bb;hpb=e6a6a9844038b1e4dd8f979c37579be695c770d0 diff --git a/steadystate.h b/steadystate.h index a23c45ba..20ccd303 100644 --- a/steadystate.h +++ b/steadystate.h @@ -1,42 +1,43 @@ #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 int td_steadystate_init(struct thread_data *); +extern uint64_t steadystate_bw_mean(struct thread_stat *); +extern uint64_t 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; - unsigned int state; + 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; - unsigned long long sum_x_sq; - unsigned long long sum_xy; - unsigned long long oldest_y; + uint64_t sum_y; + uint64_t sum_x; + uint64_t sum_x_sq; + uint64_t sum_xy; + uint64_t oldest_y; struct timeval prev_time; - unsigned long long prev_iops; - unsigned long long prev_bytes; + uint64_t prev_iops; + uint64_t prev_bytes; }; enum { @@ -47,6 +48,7 @@ enum { __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,