cubicweb/sobjects/services.py
changeset 11763 39df042f4ab4
parent 11756 60fed6272771
child 11767 432f87a63057
equal deleted inserted replaced
11762:7518cb58ab4c 11763:39df042f4ab4
    49             ):
    49             ):
    50             results['%s_cache_size' % title] = {'size': size, 'maxsize': maxsize}
    50             results['%s_cache_size' % title] = {'size': size, 'maxsize': maxsize}
    51             results['%s_cache_hit' % title] = hits
    51             results['%s_cache_hit' % title] = hits
    52             results['%s_cache_miss' % title] = misses
    52             results['%s_cache_miss' % title] = misses
    53             results['%s_cache_hit_percent' % title] = (hits * 100) / (hits + misses)
    53             results['%s_cache_hit_percent' % title] = (hits * 100) / (hits + misses)
    54         results['type_source_cache_size'] = len(repo._type_source_cache)
    54         results['type_extid_cache_size'] = len(repo._type_extid_cache)
    55         results['sql_no_cache'] = repo.system_source.no_cache
    55         results['sql_no_cache'] = repo.system_source.no_cache
    56         results['nb_open_sessions'] = len(repo._sessions)
    56         results['nb_open_sessions'] = len(repo._sessions)
    57         results['nb_active_threads'] = threading.activeCount()
    57         results['nb_active_threads'] = threading.activeCount()
    58         looping_tasks = repo._tasks_manager._looping_tasks
    58         looping_tasks = repo._tasks_manager._looping_tasks
    59         results['looping_tasks'] = [(t.name, t.interval) for t in looping_tasks]
    59         results['looping_tasks'] = [(t.name, t.interval) for t in looping_tasks]