# coding=utf-8
from __future__ import unicode_literals, absolute_import

from rpc.all import get_rpc_remote_invoker
from rpc.tool.log_tool import logging_exception


def get_service_stat(service_id):

    rpc_invoker = get_rpc_remote_invoker()
    try:
        result = rpc_invoker['doris/stat/service'](
            service_id=service_id
        ).unwrap()
        return result or {}
    except:
        logging_exception()
        return {}

