def __init__(self): super(StatsCollectingService, self).__init__() request_statistics.init_stats() self._hostname = socket.gethostname() self._stats_db = db_stats.Statistics() self._prev_time = time.time() self._notifier = status_reporter.Notification()
def get(self, request): model = stats.Statistics() entries = model.get_all() ent_list = [] for entry in entries: ent_list.append(entry.to_dict()) return ent_list
def __init__(self): super(StatsCollectingService, self).__init__() request_statistics.init_stats() self._hostname = socket.gethostname() self._stats_db = db_stats.Statistics() self._prev_time = time.time()