Introduce virDomainDirtyRateInfo structure used for domain's memory dirty rate query.
Signed-off-by: Hao Wang <wanghao232(a)huawei.com>
Reviewed-by: Chuan Zheng <zhengchuan(a)huawei.com>
---
include/libvirt/libvirt-domain.h | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 77f9116675..c7e22d4af1 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -5012,4 +5012,28 @@ int virDomainBackupBegin(virDomainPtr domain,
char *virDomainBackupGetXMLDesc(virDomainPtr domain,
unsigned int flags);
+/**
+ * virDomainDirtyRateInfo:
+ *
+ * a virDomainDirtyRateInfo is a structure filled by virDomainGetDirtyRate() and
+ * extracting dirty rate infomation for a given active Domain.
+ */
+
+typedef struct _virDomainDirtyRateInfo virDomainDirtyRateInfo;
+
+struct _virDomainDirtyRateInfo {
+ int status; /* the status of dirtyrate calculation */
+ long long dirtyRate; /* the dirtyrate in MB/s */
+ long long startTime; /* the start time of dirtyrate calculation */
+ long long calcTime; /* the period of dirtyrate calculation */
+};
+
+/**
+ * virDomainDirtyRateInfoPtr:
+ *
+ * a virDomainDirtyRateInfoPtr is a pointer to a virDomainDirtyRateInfo structure.
+ */
+
+typedef virDomainDirtyRateInfo *virDomainDirtyRateInfoPtr;
+
#endif /* LIBVIRT_DOMAIN_H */
--
2.23.0