def getAvgQualities(self, currentDate):
     avgQualities = JSONObject()
     for t in self.avgTypes:
         avgQualities[t] = JSONObject()
         avgQualities[t].values = []
         avgQualities[t].startDate = str(self.getStartDate(currentDate, t))
     for key in self.qoiMetrics:
         self.qoiMetrics[key].getAvgQualities(avgQualities, key)
     return avgQualities
예제 #2
0
 def getAverageProcessingTimes(self):
     job = JSONObject()
     job.name = self.name
     job.value = self.mean()
     if len(self.timeElementMap) > 0:
         job.values = []
     for element in self.timeElementMap:
         if len(self.timeElementMap[element].timeElementMap) > 0:
             job.values.append(self.timeElementMap[element].getAverageProcessingTimes())
         else:
             job2 = JSONObject()
             job2.name = element
             job2.value = self.timeElementMap[element].mean()
             job.values.append(job2)
     return job
 def getQualityValues(self):
     qualities = JSONObject()
     qualities.values = []
     for key in self.qoiMetrics:
         self.qoiMetrics[key].getQualityValues(qualities, key, max(self.avgTypes))
     return qualities