def GetGraph(period): graph = GraphProcessor() for histentry in get_db().GetStatisticsHistoryPeriod(period): try: graph.AddPoint(histentry['timedelta'], getvalue(histentry['snapshot'])) except: pass # ignore missing keys, division errors etc. return graph
def GetGraph(period): graph = GraphProcessor() for histentry in get_db().get_statistics_history_since(datetime.timedelta(seconds=period)): try: graph.AddPoint(histentry['timedelta'], getvalue(histentry['snapshot'])) except: pass # ignore missing keys, division errors etc. return graph