예제 #1
0
    def startTest(self, test, blocking_context=None):
        """Collect system stats for each dut"""

        self.current_test = {}
        for dut in self.dutlist:
            util = get_system_stats(ifc=dut['ssh'])
            self.current_test[dut['name']] = {'time': datetime.datetime.now(),
                                              'mem': util['MEM'],
                                              'cpuavg': util['CPUFORMATTED'],
                                              'cpucore': util['CPUFORMATTEDPERCORE'],
                                              'jvm': None
                                              }
            if self.jvm_stats:
                self.current_test[dut['name']]['jvm'] = self.retrieve_runtime(dut['rest'])
예제 #2
0
    def startTest(self, test, blocking_context=None):
        """Collect system stats for each dut"""

        self.current_test = {}
        for dut in self.dutlist:
            util = get_system_stats(ifc=dut['ssh'])
            self.current_test[dut['name']] = {
                'time': datetime.datetime.now(),
                'mem': util['MEM'],
                'cpuavg': util['CPUFORMATTED'],
                'cpucore': util['CPUFORMATTEDPERCORE'],
                'jvm': None
            }
            if self.jvm_stats:
                self.current_test[dut['name']]['jvm'] = self.retrieve_runtime(
                    dut['rest'])
예제 #3
0
    def stopTest(self, test):
        """Collect system stats for each dut and add pre and post stats
           to a result list
        """

        for dut in self.dutlist:
            util = get_system_stats(ifc=dut['ssh'])

            pretest = self.current_test[dut['name']]
            posttest = {'time': datetime.datetime.now(),
                        'mem': util['MEM'],
                        'cpuavg': util['CPUFORMATTED'],
                        'cpucore': util['CPUFORMATTEDPERCORE'],
                        'jvm': None
                        }
            if self.jvm_stats:
                posttest['jvm'] = self.retrieve_runtime(dut['rest'])

            dut['results'].append({'test': test,
                                   'pretest': pretest,
                                   'posttest': posttest})
예제 #4
0
    def stopTest(self, test):
        """Collect system stats for each dut and add pre and post stats
           to a result list
        """

        for dut in self.dutlist:
            util = get_system_stats(ifc=dut['ssh'])

            pretest = self.current_test[dut['name']]
            posttest = {
                'time': datetime.datetime.now(),
                'mem': util['MEM'],
                'cpuavg': util['CPUFORMATTED'],
                'cpucore': util['CPUFORMATTEDPERCORE'],
                'jvm': None
            }
            if self.jvm_stats:
                posttest['jvm'] = self.retrieve_runtime(dut['rest'])

            dut['results'].append({
                'test': test,
                'pretest': pretest,
                'posttest': posttest
            })