def reporterTask(self):
     random.seed()
     for i in range(0, self.roundsCnt):
         obj = self.osConnector.objectsGet(self.jobId, [self.objectList[random.randint(0, 9)]])[0]
         self.getCnt += 1
         queryCnt = random.randint(0, 2)
         if queryCnt > 0:
             queryObj = Object()
             queryObj.addString("color", "green1")
             qS = QueryStructure(queryObj, False)
             for x in range(0, queryCnt):
                 qS.setNegate(x == 1)
                 self.osConnector.query(self.jobId, [qS])
         self.queryCnt += queryCnt
         self.osConnector.objectsGet(self.jobId, self.objectList[:5])
         self.getCnt += 5
예제 #2
0
 def reporterTask(self):
     random.seed()
     for i in range(0, self.roundsCnt):
         obj = self.osConnector.objectsGet(
             self.jobId, [self.objectList[random.randint(0, 9)]])[0]
         self.getCnt += 1
         queryCnt = random.randint(0, 2)
         if queryCnt > 0:
             queryObj = Object()
             queryObj.addString("color", "green1")
             qS = QueryStructure(queryObj, False)
             for x in range(0, queryCnt):
                 qS.setNegate(x == 1)
                 self.osConnector.query(self.jobId, [qS])
         self.queryCnt += queryCnt
         self.osConnector.objectsGet(self.jobId, self.objectList[:5])
         self.getCnt += 5
 def frameworkTask(self):
     random.seed()
     k = 1
     for i in range(0, self.roundsCnt):
         obj = self.osConnector.objectsGet(self.jobId, [self.objectList[random.randint(0, 9)]])[0]
         self.getCnt += 1
         obj.addString("time%d" % k, str(time.time()))
         k = k + 1
         self.osConnector.objectsUpdate(self.jobId, [obj])
         obj.addString("time%d" % k, str(time.time()))
         k = k + 1
         self.osConnector.objectsUpdate(self.jobId, [obj])
         self.updateCnt + 2
         queryObj = Object()
         queryObj.addString("color", "green1")
         qS = QueryStructure(queryObj, False)
         self.osConnector.query(self.jobId, [qS])
         qS.setNegate(True)
         self.osConnector.query(self.jobId, [qS])
         self.queryCnt += 2
예제 #4
0
 def frameworkTask(self):
     random.seed()
     k = 1
     for i in range(0, self.roundsCnt):
         obj = self.osConnector.objectsGet(
             self.jobId, [self.objectList[random.randint(0, 9)]])[0]
         self.getCnt += 1
         obj.addString("time%d" % k, str(time.time()))
         k = k + 1
         self.osConnector.objectsUpdate(self.jobId, [obj])
         obj.addString("time%d" % k, str(time.time()))
         k = k + 1
         self.osConnector.objectsUpdate(self.jobId, [obj])
         self.updateCnt + 2
         queryObj = Object()
         queryObj.addString("color", "green1")
         qS = QueryStructure(queryObj, False)
         self.osConnector.query(self.jobId, [qS])
         qS.setNegate(True)
         self.osConnector.query(self.jobId, [qS])
         self.queryCnt += 2