aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlberto Garcia <berto@igalia.com>2015-10-28 17:33:06 +0200
committerKevin Wolf <kwolf@redhat.com>2015-11-12 16:22:46 +0100
commit96e4dedaff9922f87e4ec351d51d3f093198382a (patch)
tree4f13bd41dbde11ddedeb6ce30d0ae0ca11e8ea6e /include
parent979e9b03fc8c85d3b78a14410c64cbb16d348095 (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 'include')
-rw-r--r--include/block/accounting.h2
-rw-r--r--include/qemu/timed-average.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/include/block/accounting.h b/include/block/accounting.h
index 1dd582a99a..482926b8ec 100644
--- a/include/block/accounting.h
+++ b/include/block/accounting.h
@@ -78,5 +78,7 @@ void block_acct_invalid(BlockAcctStats *stats, enum BlockAcctType type);
void block_acct_merge_done(BlockAcctStats *stats, enum BlockAcctType type,
int num_requests);
int64_t block_acct_idle_time_ns(BlockAcctStats *stats);
+double block_acct_queue_depth(BlockAcctTimedStats *stats,
+ enum BlockAcctType type);
#endif
diff --git a/include/qemu/timed-average.h b/include/qemu/timed-average.h
index f1cdddc48b..364bf88f70 100644
--- a/include/qemu/timed-average.h
+++ b/include/qemu/timed-average.h
@@ -59,5 +59,6 @@ void timed_average_account(TimedAverage *ta, uint64_t value);
uint64_t timed_average_min(TimedAverage *ta);
uint64_t timed_average_avg(TimedAverage *ta);
uint64_t timed_average_max(TimedAverage *ta);
+uint64_t timed_average_sum(TimedAverage *ta, uint64_t *elapsed);
#endif