Dumps (saves) the current values of counters.

def dump(self):
        """
        Dumps (saves) the current values of counters.
        """
        if self._updated:
            messages = self.get_all()
            self._save(messages)

            self._lock.acquire()
            try:
                self._updated = False
                current_time = time.perf_counter() * 1000
                self._last_dump_time = current_time
            finally:
                self._lock.release()