@atomic_method
    def _collect_metrics_atomic(self, instance, mor):
        ### <TEST-INSTRUMENTATION>
        t = Timer()
        ### </TEST-INSTRUMENTATION>

        i_key = self._instance_key(instance)
        server_instance = self._get_server_instance(instance)
        perfManager = server_instance.content.perfManager
        query = vim.PerformanceManager.QuerySpec(maxSample=1,
                                                 entity=mor['mor'],
                                                 metricId=mor['metrics'],
                                                 intervalId=20,
                                                 format='normal')
        results = perfManager.QueryPerf(querySpec=[query])
        if results:
            for result in results[0].value:
                if result.id.counterId not in self.metrics_metadata[i_key]:
                    self.log.debug("Skipping this metric value, because there is no metadata about it")
                    continue
                instance_name = result.id.instance or "none"
                value = self._transform_value(instance, result.id.counterId, result.value[0])
                self.gauge(
                    "vsphere.%s" % self.metrics_metadata[i_key][result.id.counterId]['name'],
                    value,
                    hostname=mor['hostname'],
                    tags=['instance:%s' % instance_name]
                )

        ### <TEST-INSTRUMENTATION>
        self.histogram('datadog.agent.vsphere.metric_colection.time', t.total())
        ### </TEST-INSTRUMENTATION>
L{getProgramsMenuPath} has been deprecated.
dataset/ETHPy150Open serverdensity/sd-agent/checks.d/vsphere.py/VSphereCheck._collect_metrics_atomic--crossover with--dataset/ETHPy150Open twisted/twisted/twisted/python/test/test_win32.py/ProgramPathsTests.test_deprecationGetProgramsMenuPath