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 get_graph(period: int) -> GraphProcessor: graph = GraphProcessor() for histentry in get_db().get_statistics_history_since(datetime.timedelta(seconds=period)): try: graph.add_point(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_repository_history_since(repo, datetime.timedelta(seconds=period)): try: graph.AddPoint(histentry['timedelta'], getvalue(histentry['snapshot'])) except: pass # ignore missing keys, division errors etc. return graph