(self, instance_key, metrics, tag_queries)
return self._wmi_props
Create and cache a (metric name, metric type) by WMI property map and a property list.
Create and cache a (metric name, metric type) by WMI property map and a property list.
Create and cache a ( metric name metric type ) by WMI property map and a property list .
def _get_wmi_properties(self, instance_key, metrics, tag_queries):
        # type: (Any, List[List[str]], List[List[str]]) -> WMIProperties
        """
        Create and cache a (metric name, metric type) by WMI property map and a property list.
        """
        if not self._wmi_props:
            metric_name_by_property = dict(
                (wmi_property.lower(), (metric_name, metric_type)) for wmi_property, metric_name, metric_type in metrics
            )  # type: Dict[str, Tuple[str, str]]
            properties = map(lambda x: x[0], metrics + tag_queries)  # type: List[str]

            self._wmi_props = (metric_name_by_property, properties)

        return self._wmi_props
def _get_wmi_properties ( self , instance_key , metrics , tag_queries ) : # type: (Any, List[List[str]], List[List[str]]) -> WMIProperties if not self . _wmi_props : metric_name_by_property = dict ( ( wmi_property . lower ( ) , ( metric_name , metric_type ) ) for wmi_property , metric_name , metric_type in metrics ) # type: Dict[str, Tuple[str, str]] properties = map ( lambda x : x [ 0 ] , metrics + tag_queries ) # type: List[str] self . _wmi_props = ( metric_name_by_property , properties ) return self . _wmi_props