@property
    def metrics(self):
        me = psutil.Process(os.getpid())

        # Starting with 2.0.0, get_* methods are deprecated.
        # At 3.1.1 they are dropped.
        if psutil.version_info < (2, 0, 0):
            meminfo = me.get_memory_info()
            cpuinfo = me.get_cpu_times()
            create_time = me.create_time
            num_threads = me.get_num_threads()
            num_fds = me.get_num_fds()
        else:
            meminfo = me.memory_info()
            cpuinfo = me.cpu_times()
            create_time = me.create_time()
            num_threads = me.num_threads()
            num_fds = me.num_fds()
        rv = {
            'process': {
                'uptime': time.time() - create_time,
                'meminfo': {
                    'rss_bytes': meminfo.rss,
                    'vsz_bytes': meminfo.vms,
                },
                'cpu': {
                    'user_time': cpuinfo.user,
                    'system_time': cpuinfo.system,
                    'num_threads': num_threads,
                },
                'num_fds': num_fds
            },
            'counters': dict(self._COUNTERS),
            'gauges': self._GAUGES,
            'max_gauges': self._MAX_GAUGES,
            'min_gauges': self._MIN_GAUGES,
        }
        self._reset_ephemeral()
        return rv
Return the current metrics. Resets max gauges.
dataset/ETHPy150Open uber/mutornadomon/mutornadomon/monitor.py/MuTornadoMon.metrics