Exemple #1
0
def get_db_list() -> tuple:
    """
    Return list defined database spaces.

    :since: 0.7
    :return:  array of db space ids
    """
    return backend.get_db_list()
Exemple #2
0
def get_global_server_stats():
    """
    Return the most similar images to the supplied one.

    :rtype:   map

    :since: 0.7
    :return:  key is stat name, value is value.
        Keys are ['isk-daemon uptime', 'Number of databases', 'Total memory usage', 'Resident memory usage',
        'Stack memory usage']
    """

    stats = {}

    stats['isk-daemon uptime'] = statistics.human_readable(time.time() - daemon_start_time)
    stats['Number of databases'] = len(backend.get_db_list())
    stats['Total memory usage'] = statistics.memory()
    stats['Resident memory usage'] = statistics.resident()
    stats['Stack memory usage'] = statistics.stacksize()

    return stats
Exemple #3
0
def get_global_server_stats():
    """
    Return the most similar images to the supplied one.

    :rtype:   map

    :since: 0.7
    :return:  key is stat name, value is value.
        Keys are ['isk-daemon uptime', 'Number of databases', 'Total memory usage', 'Resident memory usage',
        'Stack memory usage']
    """

    stats = {}

    stats['isk-daemon uptime'] = statistics.human_readable(time.time() -
                                                           daemon_start_time)
    stats['Number of databases'] = len(backend.get_db_list())
    stats['Total memory usage'] = statistics.memory()
    stats['Resident memory usage'] = statistics.resident()
    stats['Stack memory usage'] = statistics.stacksize()

    return stats