'Set self._stats with relevant information.'

def _update_stats(self):

    current_array = self._get_current_array()
    space_info = current_array.get(space=True)
    perf_info = current_array.get(action='monitor')[0]
    hosts = current_array.list_hosts()
    snaps = current_array.list_volumes(snap=True, pending=True)
    pgroups = current_array.list_pgroups(pending=True)
    total_capacity = (float(space_info['capacity']) / units.Gi)
    used_space = (float(space_info['total']) / units.Gi)
    free_space = float((total_capacity - used_space))
    (prov_space, total_vols) = self._get_provisioned_space()
    total_hosts = len(hosts)
    total_snaps = len(snaps)
    total_pgroups = len(pgroups)
    provisioned_space = (float(prov_space) / units.Gi)
    thin_provisioning = self._get_thin_provisioning(provisioned_space, used_space)
    data = dict(volume_backend_name=self._backend_name, vendor_name='Pure    Storage', driver_version=self.VERSION, storage_protocol=self._storage_protocol)
    data['consistencygroup_support'] = True
    data['thin_provisioning_support'] = True
    data['multiattach'] = False
    data['QoS_support'] = False
    data['total_capacity_gb'] = total_capacity
    data['free_capacity_gb'] = free_space
    data['reserved_percentage'] = self.configuration.reserved_percentage
    data['provisioned_capacity'] = provisioned_space
    data['max_over_subscription_ratio'] = thin_provisioning
    data['filter_function'] = self.get_filter_function()
    data['goodness_function'] = self.get_goodness_function()
    data['total_volumes'] = total_vols
    data['total_snapshots'] = total_snaps
    data['total_hosts'] = total_hosts
    data['total_pgroups'] = total_pgroups
    data['writes_per_sec'] = perf_info['writes_per_sec']
    data['reads_per_sec'] = perf_info['reads_per_sec']
    data['input_per_sec'] = perf_info['input_per_sec']
    data['output_per_sec'] = perf_info['output_per_sec']
    data['usec_per_read_op'] = perf_info['usec_per_read_op']
    data['usec_per_write_op'] = perf_info['usec_per_write_op']
    data['queue_depth'] = perf_info['queue_depth']
    data['replication_enabled'] = self._is_replication_enabled
    data['replication_type'] = ['async']
    data['replication_count'] = len(self._replication_target_arrays)
    data['replication_targets'] = [array._backend_id for array in self._replication_target_arrays]
    self._stats = data
