jtop/core/tegra_parse.py
def SWAP(text):
    """
        SWAP X/Y (cached Z)
        X = Amount of SWAP in use in megabytes.
        Y = Total amount of SWAP available for applications.
        Z = Amount of SWAP cached in megabytes.
    """
    match = SWAP_RE.search(text)
    if match:
        return {'use': int(match.group(1)),
                'tot': int(match.group(2)),
                'unit': str(match.group(3)),
                # group 4 is an optional space
                'cached': {'size': int(match.group(5)),
                           'unit': str(match.group(6))}}
    else:
        return {}

        SWAP X/Y (cached Z)
        X = Amount of SWAP in use in megabytes.
        Y = Total amount of SWAP available for applications.
        Z = Amount of SWAP cached in megabytes.
    
SWAP X/Y (cached Z)
X = Amount of SWAP in use in megabytes.
Y = Total amount of SWAP available for applications.
Z = Amount of SWAP cached in megabytes.
SWAP X / Y ( cached Z ) X = Amount of SWAP in use in megabytes . Y = Total amount of SWAP available for applications . Z = Amount of SWAP cached in megabytes .
def SWAP(text):
    match = SWAP_RE.search(text)
    if match:
        return {'use': int(match.group(1)),
                'tot': int(match.group(2)),
                'unit': str(match.group(3)),
                'cached': {'size': int(match.group(5)),
                           'unit': str(match.group(6))}}
    else:
        return {}
def SWAP ( text ) : match = SWAP_RE . search ( text ) if match : return { 'use' : int ( match . group ( 1 ) ) , 'tot' : int ( match . group ( 2 ) ) , 'unit' : str ( match . group ( 3 ) ) , 'cached' : { 'size' : int ( match . group ( 5 ) ) , 'unit' : str ( match . group ( 6 ) ) } } else : return { }
SWAP X/Y (cached Z)
X = Amount of SWAP in use in megabytes.
SWAP X / Y ( cached Z ) X = Amount of SWAP in use in megabytes .
"""
        SWAP X/Y (cached Z)
        X = Amount of SWAP in use in megabytes.
        Y = Total amount of SWAP available for applications.
        Z = Amount of SWAP cached in megabytes.
    """ # group 4 is an optional space
text