<commit_before>from cbagent.collectors.libstats.psstats import PSStats
from cbagent.collectors import Collector


class PS(Collector):

    COLLECTOR = "atop"  # Legacy

    KNOWN_PROCESSES = ("beam.smp", "memcached", "indexer", "projector",
                       "cbq-engine", "sync_gateway")

    def __init__(self, settings):
        super(PS, self).__init__(settings)
        self.nodes = settings.hostnames or list(self.get_nodes())
        if hasattr(settings, "sync_gateway_nodes") and settings.sync_gateway_nodes:
            self.nodes += settings.sync_gateway_nodes
        if hasattr(settings, "monitor_clients") and settings.monitor_clients\
                and settings.master_node in settings.monitor_clients:
            self.nodes = settings.monitor_clients
            self.KNOWN_PROCESSES = ("python", )
        self.ps = PSStats(hosts=self.nodes,
                          user=self.ssh_username,
                          password=self.ssh_password)

    def update_metadata(self):<commit_msg>monitor "backup" & "cbbackupwrapper" in ps<commit_after>from cbagent.collectors.libstats.psstats import PSStats
from cbagent.collectors import Collector


class PS(Collector):

    COLLECTOR = "atop"  # Legacy

    KNOWN_PROCESSES = ("beam.smp", "memcached", "indexer", "projector",
                       "cbq-engine", "sync_gateway")

    def __init__(self, settings):
        super(PS, self).__init__(settings)
        self.nodes = settings.hostnames or list(self.get_nodes())
        if hasattr(settings, "sync_gateway_nodes") and settings.sync_gateway_nodes:
            self.nodes += settings.sync_gateway_nodes
        if hasattr(settings, "monitor_clients") and settings.monitor_clients\
                and settings.master_node in settings.monitor_clients:
            self.nodes = settings.monitor_clients
            self.KNOWN_PROCESSES = ("backup", "cbbackupwrapper", )
        self.ps = PSStats(hosts=self.nodes,
                          user=self.ssh_username,
                          password=self.ssh_password)

    def update_metadata(self):
{'fraction_non_alphanumeric': 0.1001926782273603, 'fraction_numerical': 0.0, 'mean_word_length': 2.7023172905525845, 'pattern_counts': {'":': 0, '<': 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': '1969133', 'n_tokens_mistral': 621, 'n_tokens_neox': 588, 'n_words': 114}