steadystate: add line for output-format=normal
[fio.git] / steadystate.c
index 696ad164ac2fe159d180a7744d9b4d8a6fd0f323..3468428f4ab97c228e9766274a79785820b561a8 100644 (file)
@@ -38,6 +38,7 @@ void steadystate_setup(void)
 
                if (!td->o.group_reporting) {
                        steadystate_alloc(td);
 
                if (!td->o.group_reporting) {
                        steadystate_alloc(td);
+                       td->ss.state |= __FIO_SS_DATA;
                        continue;
                }
 
                        continue;
                }
 
@@ -341,3 +342,25 @@ int td_steadystate_init(struct thread_data *td)
 
        return 0;
 }
 
        return 0;
 }
+
+unsigned long long steadystate_bw_mean(struct steadystate_data *ss)
+{
+       int i;
+       unsigned long long sum;
+
+       for (i = 0, sum = 0; i < ss->dur; i++)
+               sum += ss->bw_data[i];
+
+       return sum / ss->dur;
+}
+
+unsigned long long steadystate_iops_mean(struct steadystate_data *ss)
+{
+       int i;
+       unsigned long long sum;
+
+       for (i = 0, sum = 0; i < ss->dur; i++)
+               sum += ss->iops_data[i];
+
+       return sum / ss->dur;
+}