extern void add_iops_sample(struct thread_data *, enum fio_ddir, unsigned int,
struct timeval *);
extern void init_disk_util(struct thread_data *);
-extern void update_rusage_stat(struct thread_data *);
extern void setup_log(struct io_log **, struct log_params *, const char *);
extern void flush_log(struct io_log *, int);
extern void free_log(struct io_log *);
memcpy(&td->start, &tv, sizeof(tv));
lat_target_reset(td);
+ clear_rusage_stat(td);
}
void reset_fio_state(void)
struct fio_mutex *stat_mutex;
+void clear_rusage_stat(struct thread_data *td)
+{
+ struct thread_stat *ts = &td->ts;
+
+ fio_getrusage(&td->ru_start);
+ ts->usr_time = ts->sys_time = 0;
+ ts->ctx = 0;
+ ts->minf = ts->majf = 0;
+}
+
void update_rusage_stat(struct thread_data *td)
{
struct thread_stat *ts = &td->ts;
extern void stat_calc_lat_u(struct thread_stat *ts, double *io_u_lat);
extern void stat_calc_dist(unsigned int *map, unsigned long total, double *io_u_dist);
extern void reset_io_stats(struct thread_data *);
+extern void update_rusage_stat(struct thread_data *);
+extern void clear_rusage_stat(struct thread_data *);
static inline int usec_to_msec(unsigned long *min, unsigned long *max,
double *mean, double *dev)