move the graph generating code over to facets
Bring histogram facets (currently hard coded to 1h buckets) into the FacetSet module for "timestamp" keys from elastic search. This then enables us to gut a bunch of code from graph.py and do all the calculations with facet counts instead. At the same time, make all the graphs run for a full 2 weeks of data, so they are comparible to each other visually (the sliding window start time was less useful in seeing how the graphs compared) Change-Id: I971d52b5de514d0607bd8217837aed3895472d05
This commit is contained in:
@@ -75,3 +75,15 @@ class TestBasicParsing(tests.TestCase):
|
||||
self.assertEqual(len(facets.keys()), 2)
|
||||
self.assertEqual(len(facets['FAILURE'].keys()), 12)
|
||||
self.assertEqual(len(facets['SUCCESS'].keys()), 3)
|
||||
|
||||
def test_facet_histogram(self):
|
||||
data = load_sample(1226337)
|
||||
result_set = results.ResultSet(data)
|
||||
facets = results.FacetSet()
|
||||
facets.detect_facets(result_set,
|
||||
["timestamp", "build_status", "build_uuid"])
|
||||
self.assertEqual(len(facets.keys()), 14)
|
||||
print facets[1382104800000].keys()
|
||||
self.assertEqual(facets[1382104800000].keys(), ["FAILURE"])
|
||||
self.assertEqual(len(facets[1382104800000]["FAILURE"]), 2)
|
||||
self.assertEqual(facets[1382101200000].keys(), ["FAILURE"])
|
||||
|
||||
Reference in New Issue
Block a user