Not done yet, but do the basic conversion.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
td->ts.io_bytes[1] = td->io_bytes[1];
fio_mutex_down(writeout_mutex);
- if (td->ts.bw_log) {
+ if (td->bw_log) {
if (td->o.bw_log_file) {
- finish_log_named(td, td->ts.bw_log,
+ finish_log_named(td, td->bw_log,
td->o.bw_log_file, "bw");
} else
- finish_log(td, td->ts.bw_log, "bw");
+ finish_log(td, td->bw_log, "bw");
}
- if (td->ts.lat_log) {
+ if (td->lat_log) {
if (td->o.lat_log_file) {
- finish_log_named(td, td->ts.lat_log,
+ finish_log_named(td, td->lat_log,
td->o.lat_log_file, "lat");
} else
- finish_log(td, td->ts.lat_log, "lat");
+ finish_log(td, td->lat_log, "lat");
}
- if (td->ts.slat_log) {
+ if (td->slat_log) {
if (td->o.lat_log_file) {
- finish_log_named(td, td->ts.slat_log,
+ finish_log_named(td, td->slat_log,
td->o.lat_log_file, "slat");
} else
- finish_log(td, td->ts.slat_log, "slat");
+ finish_log(td, td->slat_log, "slat");
}
- if (td->ts.clat_log) {
+ if (td->clat_log) {
if (td->o.lat_log_file) {
- finish_log_named(td, td->ts.clat_log,
+ finish_log_named(td, td->clat_log,
td->o.lat_log_file, "clat");
} else
- finish_log(td, td->ts.clat_log, "clat");
+ finish_log(td, td->clat_log, "clat");
}
fio_mutex_up(writeout_mutex);
if (td->o.exec_postrun)
struct thread_stat {
char *name;
char *verror;
- int error;
- int groupid;
- pid_t pid;
+ int32_t error;
+ int32_t groupid;
+ uint32_t pid;
char *description;
- int members;
-
- struct io_log *slat_log;
- struct io_log *clat_log;
- struct io_log *lat_log;
- struct io_log *bw_log;
+ uint32_t members;
/*
* bandwidth and latency stats
struct io_stat lat_stat[2]; /* total latency */
struct io_stat bw_stat[2]; /* bandwidth stats */
- unsigned long long stat_io_bytes[2];
+ uint64_t stat_io_bytes[2];
struct timeval stat_sample_time[2];
/*
*/
struct rusage ru_start;
struct rusage ru_end;
- unsigned long usr_time;
- unsigned long sys_time;
- unsigned long ctx;
- unsigned long minf, majf;
+ uint64_t usr_time;
+ uint64_t sys_time;
+ uint64_t ctx;
+ uint64_t minf, majf;
/*
* IO depth and latency stats
*/
- unsigned int clat_percentiles;
+ uint64_t clat_percentiles;
double *percentile_list;
- unsigned int io_u_map[FIO_IO_U_MAP_NR];
- unsigned int io_u_submit[FIO_IO_U_MAP_NR];
- unsigned int io_u_complete[FIO_IO_U_MAP_NR];
- unsigned int io_u_lat_u[FIO_IO_U_LAT_U_NR];
- unsigned int io_u_lat_m[FIO_IO_U_LAT_M_NR];
- unsigned int io_u_plat[2][FIO_IO_U_PLAT_NR];
- unsigned long total_io_u[3];
- unsigned long short_io_u[3];
- unsigned long total_submit;
- unsigned long total_complete;
-
- unsigned long long io_bytes[2];
- unsigned long long runtime[2];
- unsigned long total_run_time;
+ uint32_t io_u_map[FIO_IO_U_MAP_NR];
+ uint32_t io_u_submit[FIO_IO_U_MAP_NR];
+ uint32_t io_u_complete[FIO_IO_U_MAP_NR];
+ uint32_t io_u_lat_u[FIO_IO_U_LAT_U_NR];
+ uint32_t io_u_lat_m[FIO_IO_U_LAT_M_NR];
+ uint32_t io_u_plat[2][FIO_IO_U_PLAT_NR];
+ uint64_t total_io_u[3];
+ uint64_t short_io_u[3];
+ uint64_t total_submit;
+ uint64_t total_complete;
+
+ uint64_t io_bytes[2];
+ uint64_t runtime[2];
+ uint64_t total_run_time;
/*
* IO Error related stats
*/
- unsigned continue_on_error;
- unsigned long total_err_count;
- int first_error;
+ uint16_t continue_on_error;
+ uint64_t total_err_count;
+ int32_t first_error;
- unsigned int kb_base;
+ uint32_t kb_base;
};
struct bssplit {
int thread_number;
int groupid;
struct thread_stat ts;
+
+ struct io_log *slat_log;
+ struct io_log *clat_log;
+ struct io_log *lat_log;
+ struct io_log *bw_log;
+
struct fio_file **files;
unsigned int files_size;
unsigned int files_index;
goto err;
if (td->o.write_lat_log) {
- setup_log(&td->ts.lat_log);
- setup_log(&td->ts.slat_log);
- setup_log(&td->ts.clat_log);
+ setup_log(&td->lat_log);
+ setup_log(&td->slat_log);
+ setup_log(&td->clat_log);
}
if (td->o.write_bw_log)
- setup_log(&td->ts.bw_log);
+ setup_log(&td->bw_log);
if (!td->o.name)
td->o.name = strdup(jobname);
* Use for maintaining statistics
*/
struct io_stat {
- unsigned long max_val;
- unsigned long min_val;
- unsigned long samples;
+ uint64_t max_val;
+ uint64_t min_val;
+ uint64_t samples;
double mean;
double S;
add_stat_sample(&ts->clat_stat[ddir], usec);
- if (ts->clat_log)
- add_log_sample(td, ts->clat_log, usec, ddir, bs);
+ if (td->clat_log)
+ add_log_sample(td, td->clat_log, usec, ddir, bs);
if (ts->clat_percentiles)
add_clat_percentile_sample(ts, usec, ddir);
add_stat_sample(&ts->slat_stat[ddir], usec);
- if (ts->slat_log)
- add_log_sample(td, ts->slat_log, usec, ddir, bs);
+ if (td->slat_log)
+ add_log_sample(td, td->slat_log, usec, ddir, bs);
}
void add_lat_sample(struct thread_data *td, enum fio_ddir ddir,
add_stat_sample(&ts->lat_stat[ddir], usec);
- if (ts->lat_log)
- add_log_sample(td, ts->lat_log, usec, ddir, bs);
+ if (td->lat_log)
+ add_log_sample(td, td->lat_log, usec, ddir, bs);
}
void add_bw_sample(struct thread_data *td, enum fio_ddir ddir, unsigned int bs,
1000 / spent / 1024;
add_stat_sample(&ts->bw_stat[ddir], rate);
- if (ts->bw_log)
- add_log_sample(td, ts->bw_log, rate, ddir, bs);
+ if (td->bw_log)
+ add_log_sample(td, td->bw_log, rate, ddir, bs);
fio_gettime(&ts->stat_sample_time[ddir], NULL);
ts->stat_io_bytes[ddir] = td->this_io_bytes[ddir];