Esempio n. 1
0
 def testQueryFetch(self):
     mystart = timestamp - nrOfMetrics
     (_, _, _, values) = whisbert.fetch(tmp_path + "/a/*/*/1",
             datetime.datetime.fromtimestamp(mystart),
             datetime.datetime.fromtimestamp(timestamp))
     for i in range(len(values)):
         self.assertEquals(values[i], i+i) # we got the summed results of the two metrices
Esempio n. 2
0
 def testFetch(self):
     mystart = timestamp - nrOfMetrics
     (_, _, _, values) = whisbert.fetch(metric1,
             datetime.datetime.fromtimestamp(mystart),
             datetime.datetime.fromtimestamp(timestamp))
     for i in range(len(values)):
         self.assertEquals(values[i], i)