steadystate: update man page
[fio.git] / steadystate.h
... / ...
CommitLineData
1#ifndef FIO_STEADYSTATE_H
2#define FIO_STEADYSTATE_H
3
4#include "thread_options.h"
5
6extern void steadystate_check(void);
7extern void steadystate_setup(void);
8extern int td_steadystate_init(struct thread_data *);
9
10extern bool steadystate_enabled;
11
12/*
13 * For steady state detection
14 */
15struct steadystate_data {
16 double limit;
17 unsigned long long dur;
18 unsigned long long ramp_time;
19 bool pct;
20
21 unsigned int state;
22
23 unsigned int head;
24 unsigned int tail;
25 unsigned long *iops_data;
26 unsigned long *bw_data;
27
28 double slope;
29 double criterion;
30 double deviation;
31
32 unsigned long long sum_y;
33 unsigned long long sum_x;
34 unsigned long long sum_x_sq;
35 unsigned long long sum_xy;
36 unsigned long long oldest_y;
37
38 struct timeval prev_time;
39 unsigned long long prev_iops;
40 unsigned long long prev_bytes;
41};
42
43enum {
44 __FIO_SS_IOPS = 1,
45 __FIO_SS_BW = 2,
46 __FIO_SS_SLOPE = 4,
47 __FIO_SS_ATTAINED = 8,
48 __FIO_SS_RAMP_OVER = 16,
49 __FIO_SS_LAST = 32,
50
51 FIO_SS_IOPS = __FIO_SS_IOPS,
52 FIO_SS_IOPS_SLOPE = __FIO_SS_IOPS | __FIO_SS_SLOPE,
53 FIO_SS_BW = __FIO_SS_BW,
54 FIO_SS_BW_SLOPE = __FIO_SS_BW | __FIO_SS_SLOPE,
55};
56
57#define STEADYSTATE_MSEC 1000
58
59#endif