diff options
author | Alberto Garcia <berto@igalia.com> | 2015-10-28 17:33:06 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-11-12 16:22:46 +0100 |
commit | 96e4dedaff9922f87e4ec351d51d3f093198382a (patch) | |
tree | 4f13bd41dbde11ddedeb6ce30d0ae0ca11e8ea6e /block/qapi.c | |
parent | 979e9b03fc8c85d3b78a14410c64cbb16d348095 (diff) |
block: Add average I/O queue depth to BlockDeviceTimedStats
This patch adds two new fields to BlockDeviceTimedStats that track the
average number of pending read and write requests for a block device.
The values are calculated for the period of time defined for that
interval.
Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: fd31fef53e2714f2f30d59ed58ca2f67ec9ab926.1446044837.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qapi.c')
-rw-r--r-- | block/qapi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/block/qapi.c b/block/qapi.c index 6169a22243..d20262decb 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -402,6 +402,11 @@ static BlockStats *bdrv_query_stats(const BlockDriverState *bs, dev_stats->min_flush_latency_ns = timed_average_min(fl); dev_stats->max_flush_latency_ns = timed_average_max(fl); dev_stats->avg_flush_latency_ns = timed_average_avg(fl); + + dev_stats->avg_rd_queue_depth = + block_acct_queue_depth(ts, BLOCK_ACCT_READ); + dev_stats->avg_wr_queue_depth = + block_acct_queue_depth(ts, BLOCK_ACCT_WRITE); } } |