client: remove command reply after calling into client update_job
[fio.git] / stat.h
diff --git a/stat.h b/stat.h
index 78e46711f355b2a06a0cd3d561140fa2dbfc471a..ce640d9c72071339def786b9e3bdb44891b8759c 100644 (file)
--- a/stat.h
+++ b/stat.h
@@ -1,6 +1,8 @@
 #ifndef FIO_STAT_H
 #define FIO_STAT_H
 
+#include "iolog.h"
+
 struct group_run_stats {
        uint64_t max_run[2], min_run[2];
        uint64_t max_bw[2], min_bw[2];
@@ -116,6 +118,7 @@ struct thread_stat {
        char name[FIO_JOBNAME_SIZE];
        char verror[FIO_VERROR_SIZE];
        uint32_t error;
+       uint32_t thread_number;
        uint32_t groupid;
        uint32_t pid;
        char description[FIO_JOBNAME_SIZE];
@@ -200,6 +203,11 @@ extern void init_group_run_stat(struct group_run_stats *gs);
 extern void eta_to_str(char *str, unsigned long eta_sec);
 extern int calc_lat(struct io_stat *is, unsigned long *min, unsigned long *max, double *mean, double *dev);
 extern unsigned int calc_clat_percentiles(unsigned int *io_u_plat, unsigned long nr, fio_fp64_t *plist, unsigned int **output, unsigned int *maxv, unsigned int *minv);
+extern void stat_calc_lat_m(struct thread_stat *ts, double *io_u_lat);
+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);
+
+#define ts_total_io_u(ts)      ((ts)->total_io_u[0] + (ts)->total_io_u[1])
 
 static inline int usec_to_msec(unsigned long *min, unsigned long *max,
                               double *mean, double *dev)