def __init__(self, name, start=False, profile_sql=False, connection_names=('default',)):
        """Constructor

        :param name: name of the Profiler instance
        :type name: string
        :param start: whether to start immediately after Profiler instantiation
        :type start: bool
        :param profile_sql: whether to profile sql queries or not
        :type profile_sql: bool
        :param connection_names: names of database connections to profile
        :type connection_names: tuple
        :returns: Profiler instance
        :rtype: profiling.Profiler

        """
        if settings is not None and hasattr(settings, 'PROFILING_LOGGER_NAME'):
            logger_name = settings.PROFILING_LOGGER_NAME
        else:
            logger_name = __name__
        if name.find(' ') == -1:
            logger_name += '.{0}'.format(name)
        self.log = logging.getLogger(logger_name)
        self.name = name
        self.pre_queries_cnt = {}
        self.profile_sql = profile_sql
        try:
            assert isinstance(connection_names, tuple)
            self.connection_names = connection_names
        except __HOLE__:
            self.connection_names = 'default',
        if start:
            self.start()
dataset/ETHPy150Open CodeScaleInc/django-profiler/profiling/__init__.py/Profiler.__init__