def METHOD_NAME(self):
    """
    Get the metrics of all the GPUs
    """
    for gpu in self._gpus:
        handle = self._nvmlDeviceGetHandleByUUID(gpu.device_uuid())
        for metric in self._metrics:
            nvml_field = self.model_analyzer_to_nvml_field[metric]
            # convert to microseconds to keep consistency with the dcgm monitor
            atimestamp = time.time_ns() // 1000
            if metric == GPUPeakMemory:
                info = self._nvml.nvmlDeviceGetMemoryInfo(handle)
                # @Yueming TODO: need to update with the nvml API version 2. Because the nvml API version 1 returns the used memory including the memory allocated by the GPU driver.
                # used_mem = info.used
                # reserved_mem = info.reserved
                # self._records[gpu][metric].append((atimestamp, used_mem - reserved_mem))
                self._records[gpu][metric].append((atimestamp, float(getattr(info, nvml_field)/1024/1024)))
            elif metric == GPUFreeMemory:
                info = self._nvml.nvmlDeviceGetMemoryInfo(handle)
                self._records[gpu][metric].append((atimestamp, float(getattr(info, nvml_field)/1024/1024)))
            elif metric == GPUUtilization:
                info = self._nvml.nvmlDeviceGetUtilizationRates(handle)
                self._records[gpu][metric].append((atimestamp, getattr(info, nvml_field)))
            elif metric == GPUPowerUsage:
                info = self._nvml.nvmlDeviceGetPowerUsage(handle)
                self._records[gpu][metric].append((atimestamp, info))