def setData(self, data):
     res = self.get_base_fields()
     res.update(self.parseData(data))
     if self.benchmark != 'sleep':
         results = self.getProperty('performance_results', [])
         results.append(res)
         self.setProperty('performance_results', results)
Esempio n. 2
0
    def get(self, resultSpec, kwargs):
        builderid = kwargs.get("builderid", None)
        complete = resultSpec.popBooleanFilter('complete')
        claimed_by_masterid = resultSpec.popBooleanFilter(
            'claimed_by_masterid')
        if claimed_by_masterid:
            # claimed_by_masterid takes precedence over 'claimed' filter
            # (no need to check consistency with 'claimed' filter even if
            # 'claimed'=False with 'claimed_by_masterid' set, doesn't make sense)
            claimed = claimed_by_masterid
        else:
            claimed = resultSpec.popBooleanFilter('claimed')

        bsid = resultSpec.popOneFilter('buildsetid', 'eq')
        resultSpec.fieldMapping = self.fieldMapping
        buildrequests = yield self.master.db.buildrequests.getBuildRequests(
            builderid=builderid,
            complete=complete,
            claimed=claimed,
            bsid=bsid,
            resultSpec=resultSpec)
        results = []
        filters = resultSpec.popProperties() if hasattr(resultSpec, 'popProperties') else []
        for br in buildrequests:
            yield self.addPropertiesToBuildRequest(br, filters)
            results.append((yield self.db2data(br)))
        defer.returnValue(results)
 def addResult(self, name, result):
     res = {
         'project': 'Zcash',
         'environment': self.getProperty('workername'),
         'branch': 'master', #self.getProperty('branch'),
         'commitid': self.getProperty('got_revision'),
         'executable': 'zcash',
         'benchmark': name,
         'result_value': result,
     }
     results = self.getProperty('performance_results', [])
     results.append(res)
     self.setProperty('performance_results', results)
 def addResult(self, name, median, spread):
     res = {
         'project': self.project,
         'environment': self.getProperty('workername'),
         'branch': self.getProperty('branch'),
         'commitid': self.getProperty('got_revision'),
         'executable': self.executable,
         'benchmark': name,
         'units': 'ns/iter',
         'result_value': median,
         'min': median - (spread/2),
         'max': median + (spread/2),
     }
     results = self.getProperty('performance_results', [])
     results.append(res)
     self.setProperty('performance_results', results)