示例#1
0
    def run(self, arglist=None):
        sruuid = self.goldimagesruuid

        createLog = "vmcreate"
        destroyLog = "vmdestroy"
        for log in createLog, destroyLog:
            self.log(log, "# i  duration")

        uuids = {}

        # Create the VDIs on the SR
        for i in range(0, self.numvdis):
            cmd = "time xe vdi-create type=user virtual-size=1MiB name-label=test%d sr-uuid=%s" % (
                i, sruuid)
            dur = libperf.timeCLICommand(self.host, cmd)
            line = "%d  %f" % (i, dur)
            self.log(createLog, line)

            cmd = "xe vdi-list name-label=test%d params=uuid --minimal" % i
            uuids[i] = self.host.execdom0(cmd).strip()
            xenrt.TEC().logverbose("uuid of vdi %d is %s" % (i, uuids[i]))

        # Delete the VDIs
        for i in range(0, self.numvdis):
            cmd = "time xe vdi-destroy uuid=%s" % uuids[i]
            dur = libperf.timeCLICommand(self.host, cmd)
            line = "%d  %f" % (i, dur)
            self.log(destroyLog, line)
示例#2
0
    def run(self, arglist=None):
        suspendLog = "vmsuspend"
        resumeLog = "vmresume"
        for log in suspendLog, resumeLog:
            self.log(log, "# memsize    iter   duration")

        for memsize in self.memsizes:
            # Set the memory size
            self.vm.memset(memsize)

            # Start the VM
            self.vm.start()

            uuid = self.vm.getUUID()

            for i in range(0, self.numiters):
                # Suspend the VM
                cmd = "time xe vm-suspend uuid=%s" % uuid
                dur = libperf.timeCLICommand(self.host, cmd)
                line = "%d  %d  %f" % (memsize, i, dur)
                self.log(suspendLog, line)
                
                # Resume the VM
                cmd = "time xe vm-resume uuid=%s" % uuid
                dur = libperf.timeCLICommand(self.host, cmd)
                line = "%d  %d  %f" % (memsize, i, dur)
                self.log(resumeLog, line)

            # Shutdown the VM
            self.vm.shutdown()
示例#3
0
    def run(self, arglist=None):
        suspendLog = "vmsuspend"
        resumeLog = "vmresume"
        for log in suspendLog, resumeLog:
            self.log(log, "# memsize    iter   duration")

        for memsize in self.memsizes:
            # Set the memory size
            self.vm.memset(memsize)

            # Start the VM
            self.vm.start()

            uuid = self.vm.getUUID()

            for i in range(0, self.numiters):
                # Suspend the VM
                cmd = "time xe vm-suspend uuid=%s" % uuid
                dur = libperf.timeCLICommand(self.host, cmd)
                line = "%d  %d  %f" % (memsize, i, dur)
                self.log(suspendLog, line)

                # Resume the VM
                cmd = "time xe vm-resume uuid=%s" % uuid
                dur = libperf.timeCLICommand(self.host, cmd)
                line = "%d  %d  %f" % (memsize, i, dur)
                self.log(resumeLog, line)

            # Shutdown the VM
            self.vm.shutdown()
示例#4
0
    def run(self, arglist=None):
        sruuid = self.goldimagesruuid

        createLog = "vmcreate"
        destroyLog = "vmdestroy"
        for log in createLog, destroyLog:
            self.log(log, "# i  duration")

        uuids = {}

        # Create the VDIs on the SR
        for i in range(0, self.numvdis):
            cmd = "time xe vdi-create type=user virtual-size=1MiB name-label=test%d sr-uuid=%s" % (i, sruuid)
            dur = libperf.timeCLICommand(self.host, cmd)
            line = "%d  %f" % (i, dur)
            self.log(createLog, line)

            cmd = "xe vdi-list name-label=test%d params=uuid --minimal" % i
            uuids[i] = self.host.execdom0(cmd).strip()
            xenrt.TEC().logverbose("uuid of vdi %d is %s" % (i, uuids[i]))

        # Delete the VDIs
        for i in range(0, self.numvdis):
            cmd = "time xe vdi-destroy uuid=%s" % uuids[i]
            dur = libperf.timeCLICommand(self.host, cmd)
            line = "%d  %f" % (i, dur)
            self.log(destroyLog, line)