measure how long it takes to create a snaphsot

This commit is contained in:
Edison Su 2014-08-12 15:13:34 -07:00
parent f30fc6b673
commit a1bee2cb61

View File

@ -1118,9 +1118,12 @@ public class KVMStorageProcessor implements StorageProcessor {
String vmUuid = vm.getUUIDString();
Object[] args = new Object[] {snapshotName, vmUuid};
String snapshot = SnapshotXML.format(args);
s_logger.debug(snapshot);
long start = System.currentTimeMillis();
vm.snapshotCreateXML(snapshot);
long total = (System.currentTimeMillis() - start)/1000;
s_logger.debug("snapshot takes " + total + " seconds to finish");
/*
* libvirt on RHEL6 doesn't handle resume event emitted from
* qemu