Skip to content

Commit a1bee2c

Browse files
committed
measure how long it takes to create a snaphsot
1 parent f30fc6b commit a1bee2c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,9 +1118,12 @@ public Answer createSnapshot(CreateObjectCommand cmd) {
11181118
String vmUuid = vm.getUUIDString();
11191119
Object[] args = new Object[] {snapshotName, vmUuid};
11201120
String snapshot = SnapshotXML.format(args);
1121-
s_logger.debug(snapshot);
11221121

1122+
long start = System.currentTimeMillis();
11231123
vm.snapshotCreateXML(snapshot);
1124+
long total = (System.currentTimeMillis() - start)/1000;
1125+
s_logger.debug("snapshot takes " + total + " seconds to finish");
1126+
11241127
/*
11251128
* libvirt on RHEL6 doesn't handle resume event emitted from
11261129
* qemu

0 commit comments

Comments
 (0)