# Path: osprofiler/drivers/base.py
# LOG = logging.getLogger(__name__)
# def get_driver(connection_string, *args, **kwargs):
#     def __init__(self, connection_str, project=None, service=None, host=None,
#                  **kwargs):
#     def notify(self, info, **kwargs):
#     def get_report(self, base_id):
#     def get_name(cls):
#     def list_traces(self, fields=None):
#     def list_error_traces(self):
#     def _build_tree(nodes):
#     def _append_results(self, trace_id, parent_id, name, project, service,
#                         host, timestamp, raw_payload=None):
#     def _parse_results(self):
#         def msec(dt):
# class Driver(object):


import logging
from osprofiler.drivers import base


def get():
    """Returns notifier callable."""
    return __notifier


def set(notifier):
    """Service that are going to use profiler should set callable notifier.

       Callable notifier is instance of callable object, that accept exactly
       one argument "info". "info" - is dictionary of values that contains
       profiling information.
    """
    global __notifier
    __notifier = notifier


def create(connection_string, *args, **kwargs):
    """Create notifier based on specified plugin_name

    :param connection_string: connection string which specifies the storage
                              driver for notifier
    :param args: args that will be passed to the driver's __init__ method
    :param kwargs: kwargs that will be passed to the driver's __init__ method
    :returns: Callable notifier method
    """
    global __notifier_cache
    if connection_string not in __notifier_cache:
        try:

# Path: osprofiler/drivers/base.py
# LOG = logging.getLogger(__name__)
# def get_driver(connection_string, *args, **kwargs):
#     def __init__(self, connection_str, project=None, service=None, host=None,
#                  **kwargs):
#     def notify(self, info, **kwargs):
#     def get_report(self, base_id):
#     def get_name(cls):
#     def list_traces(self, fields=None):
#     def list_error_traces(self):
#     def _build_tree(nodes):
#     def _append_results(self, trace_id, parent_id, name, project, service,
#                         host, timestamp, raw_payload=None):
#     def _parse_results(self):
#         def msec(dt):
# class Driver(object):


# Path: osprofiler/notifier.py
import logging
from osprofiler.drivers import base



def get():
    """Returns notifier callable."""
    return __notifier


def set(notifier):
    """Service that are going to use profiler should set callable notifier.

       Callable notifier is instance of callable object, that accept exactly
       one argument "info". "info" - is dictionary of values that contains
       profiling information.
    """
    global __notifier
    __notifier = notifier


def create(connection_string, *args, **kwargs):
    """Create notifier based on specified plugin_name

    :param connection_string: connection string which specifies the storage
                              driver for notifier
    :param args: args that will be passed to the driver's __init__ method
    :param kwargs: kwargs that will be passed to the driver's __init__ method
    :returns: Callable notifier method
    """
    global __notifier_cache
    if connection_string not in __notifier_cache:
        try:

            driver = base.get_driver(connection_string, *args, **kwargs)