stat: fix accumulation of latency buckets
PATCH 1/1 stat: fix accumulation of latency buckets
From: Vincent Fu <[email protected]>
The numbers of buckets for nsec, usec, and msec latencies may differ from each other. So we need to iterate separately over the three types of buckets.
--- stat.c | 4 ++++ 1 file changed, 4 insertions(+)
stat.c +4 -0
@@ -1684,7 +1684,11 @@ void sum_thread_stats(struct thread_stat *dst, struct thread_stat *src, }for (k =0 ; k <FIO_IO_U_LAT_N_NR ; k++) { dst->io_u_lat_n[k] += src->io_u_lat_n[k]; + } +for (k =0 ; k <FIO_IO_U_LAT_U_NR ; k++) { dst->io_u_lat_u[k] += src->io_u_lat_u[k]; + } +for (k =0 ; k <FIO_IO_U_LAT_M_NR ; k++) { dst->io_u_lat_m[k] += src->io_u_lat_m[k]; }for (k =0 ; k <FIO_IO_U_PLAT_NR ; k++)
Signature · 1 line
2.17.1
Quoted 5 lines · On 3/21/19 10:45 AM, [email protected] wrote:
From: Vincent Fu <[email protected]>
The numbers of buckets for nsec, usec, and msec latencies may differ from each other. So we need to iterate separately over the three types of buckets.
Good catch! Thanks Vincent, applied.
Signature · 1 line
Jens Axboe