Esempio n. 1
0
    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
Esempio n. 2
0
    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
Esempio n. 3
0
    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