<commit_before>import diamond.collector
import diamond.convertor
import os

try:
    import psutil
except ImportError:
    psutil = None

_KEY_MAPPING = [
    'MemTotal'     ,
    'MemFree'      ,
    'Buffers'      ,
    'Cached'       ,
    'Active'       ,
    'Dirty'        ,
    'Inactive'     ,
    'SwapTotal'    ,
    'SwapFree'     ,
    'SwapCached'   ,
    'VmallocTotal' ,
    'VmallocUsed'  ,
    'VmallocChunk'
]

class MemoryCollector(diamond.collector.Collector):
    """
    This class collects data on memory utilization

    /proc/meminfo is used to gather the data, which is returned in units of kB
    
    #### Dependencies

    * /proc/meminfo or psutil
    
    """

    PROC = '/proc/meminfo'<commit_msg>Move the memory doc to the module level<commit_after>"""
This class collects data on memory utilization

/proc/meminfo is used to gather the data, which is returned in units of kB

#### Dependencies

* /proc/meminfo or psutil

"""

import diamond.collector
import diamond.convertor
import os

try:
    import psutil
except ImportError:
    psutil = None

_KEY_MAPPING = [
    'MemTotal'     ,
    'MemFree'      ,
    'Buffers'      ,
    'Cached'       ,
    'Active'       ,
    'Dirty'        ,
    'Inactive'     ,
    'SwapTotal'    ,
    'SwapFree'     ,
    'SwapCached'   ,
    'VmallocTotal' ,
    'VmallocUsed'  ,
    'VmallocChunk'
]

class MemoryCollector(diamond.collector.Collector):

    PROC = '/proc/meminfo'
{'fraction_non_alphanumeric': 0.10309278350515463, 'fraction_numerical': 0.0, 'mean_word_length': 2.2283813747228383, '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': '645206', 'n_tokens_mistral': 505, 'n_tokens_neox': 486, 'n_words': 119}