<commit_before>from __future__ import division
import platform
import time
import random
import socket

from bmcpyagent.core.collector import BaseCollector
from bmcpyagent.logging.logger import Logger
from bmcpyagent.util import util
from bmcpyagent.util.util import Util
from bmcpyagent.configuration.configuration import Configuration
from bmcpyagent.error.exception import ConfigurationError


class Random(BaseCollector):

    def __init__(self, collector_name):
        BaseCollector.__init__(self)
        logger = Logger()
        global log
        log = logger.get_logger(collector_name)

        global config
        config = Configuration()

        self.collector_name = collector_name
        self.entity_type_name = "random"
        self.entity_name = "random"

        return super(Random, self).__init__(collector_name)

    def register(self):

        # Entity type meta information
        entity_type_meta = {"name": self.entity_type_name, "id": self.entity_type_name}

        try:
            metrics = config.get_config_section(self.collector_name, Configuration.SECTION_METRICS)

            for metric in metrics:
                self.shell.register_metric(e_meta=entity_type_meta, m_meta=metric)
        except ConfigurationError as e:
            log.fatal("%s. Please contact BMC Customer support for help.", e.error.tostring())

    def discovery(self):<commit_msg>Remove calling of BaseCollector init<commit_after>from __future__ import division
import platform
import time
import random
import socket

from bmcpyagent.core.collector import BaseCollector
from bmcpyagent.logging.logger import Logger
from bmcpyagent.util import util
from bmcpyagent.util.util import Util
from bmcpyagent.configuration.configuration import Configuration
from bmcpyagent.error.exception import ConfigurationError


class Random(BaseCollector):

    def __init__(self, collector_name):
        logger = Logger()
        global log
        log = logger.get_logger(collector_name)

        global config
        config = Configuration()

        self.collector_name = collector_name
        self.entity_type_name = "random"
        self.entity_name = "random"

        return super(Random, self).__init__(collector_name)

    def register(self):

        # Entity type meta information
        entity_type_meta = {"name": self.entity_type_name, "id": self.entity_type_name}

        try:
            metrics = config.get_config_section(self.collector_name, Configuration.SECTION_METRICS)

            for metric in metrics:
                self.shell.register_metric(e_meta=entity_type_meta, m_meta=metric)
        except ConfigurationError as e:
            log.fatal("%s. Please contact BMC Customer support for help.", e.error.tostring())

    def discovery(self):
{'fraction_non_alphanumeric': 0.07024495677233429, 'fraction_numerical': 0.0, 'mean_word_length': 3.3458528951486697, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '552787', 'n_tokens_mistral': 763, 'n_tokens_neox': 734, 'n_words': 196}