* [PATCH] stat: fix accumulation of latency buckets
@ 2019-03-21 16:45 vincentfu
2019-03-21 16:54 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: vincentfu @ 2019-03-21 16:45 UTC (permalink / raw)
To: axboe, fio; +Cc: Vincent Fu
From: Vincent Fu <vincent.fu@wdc.com>
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(+)
diff --git a/stat.c b/stat.c
index 66a13bca..ecef1099 100644
--- a/stat.c
+++ b/stat.c
@@ -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++)
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] stat: fix accumulation of latency buckets
2019-03-21 16:45 [PATCH] stat: fix accumulation of latency buckets vincentfu
@ 2019-03-21 16:54 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2019-03-21 16:54 UTC (permalink / raw)
To: vincentfu, fio; +Cc: Vincent Fu
On 3/21/19 10:45 AM, vincentfu@gmail.com wrote:
> From: Vincent Fu <vincent.fu@wdc.com>
>
> 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.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-21 16:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-21 16:45 [PATCH] stat: fix accumulation of latency buckets vincentfu
2019-03-21 16:54 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox