def METHOD_NAME(self, global_step, timestamp):
    """The sampling interval should be bigger than 6s. It means
    that we calculate the speed with interval 1min.
    """
    if not self._start_training_time:
        self._start_training_time = time.time()
        logger.info(
            "The initial training time is %s",
            self._start_training_time - self._init_time,
        )
    self._global_step = global_step
    if (
        not self._global_step_records
        or global_step > self._global_step_records[-1].global_step
    ):
        self._sample_count += 1
        self._global_step_records.append(
            GlobalStepRecord(global_step, timestamp, len(self._workers))
        )
        if len(self._global_step_records) > self._max_record_count:
            self._global_step_records.pop(0)
        logger.info(
            "Global step = %s, Worker number = %s, speed = %s steps/s",
            self._global_step,
            self._global_step_records[-1].worker_num,
            round(self.running_speed, 2),
        )