def get_recent_hits_and_weights(
            self, hours = 0, minutes = 0, seconds = 0
        ):
        start = self._calculate_start(hours, minutes, seconds)
        start = start.replace(
            second = (start.second / 10) * 10, microsecond = 0
        )
        preloaded_hashes = {}
        gathered = []
        current = start
        now = datetime.datetime.utcnow().replace(
            second = (start.second / 10) * 10, microsecond = 0
        )
        while current < now:
            hash, slot = self._hash_and_slot(current)
            if hash not in preloaded_hashes:
                preloaded_hashes[hash] = self.r.hgetall(hash)
            hits = int(preloaded_hashes[hash].get(slot, 0))
            weight = int(preloaded_hashes[hash].get(slot + 'w', 0))
            gathered.append((current, hits, weight))
            current += datetime.timedelta(seconds = 10)
        return gathered
dataset/ETHPy150Open simonw/django-redis-monitor/django_redis_monitor/redis_monitor.py/RedisMonitor.get_recent_hits_and_weights/original