Commit | Line | Data |
---|---|---|
16e56d25 VF |
1 | #ifndef FIO_STEADYSTATE_H |
2 | #define FIO_STEADYSTATE_H | |
3 | ||
4 | extern void steadystate_check(void); | |
5 | extern void steadystate_setup(void); | |
ba8fb6f6 | 6 | extern void steadystate_alloc(struct thread_data *); |
16e56d25 VF |
7 | extern bool steadystate_deviation(unsigned long, unsigned long, struct thread_data *); |
8 | extern bool steadystate_slope(unsigned long, unsigned long, struct thread_data *); | |
0a70e050 JA |
9 | |
10 | /* | |
11 | * For steady state detection | |
12 | */ | |
13 | struct steadystate_data { | |
14 | double limit; | |
15 | unsigned long long dur; | |
16 | unsigned long long ramp_time; | |
17 | bool (*evaluate)(unsigned long, unsigned long, struct thread_data *); | |
18 | bool check_iops; | |
19 | bool check_slope; | |
20 | bool pct; | |
21 | ||
22 | int attained; | |
23 | int last_in_group; | |
24 | int ramp_time_over; | |
25 | ||
26 | unsigned int head; | |
27 | unsigned int tail; | |
28 | unsigned long *iops_data; | |
29 | unsigned long *bw_data; | |
30 | ||
31 | double slope; | |
32 | double criterion; | |
33 | double deviation; | |
34 | ||
35 | unsigned long long sum_y; | |
36 | unsigned long long sum_x; | |
37 | unsigned long long sum_x_sq; | |
38 | unsigned long long sum_xy; | |
39 | unsigned long long oldest_y; | |
40 | ||
41 | struct timeval prev_time; | |
42 | unsigned long long prev_iops; | |
43 | unsigned long long prev_bytes; | |
44 | }; | |
45 | ||
16e56d25 | 46 | #endif |