Ejemplo n.º 1
0
def make_memory_info_msg(clean_visible_path=None, ner_xml_path=None):
    msg = 'reporting memory while running on:\n%r\n%r' % (clean_visible_path, ner_xml_path)
    msg += 'VmSize: %d bytes' % _memory.memory()
    msg += 'VmRSS:  %d bytes' % _memory.resident()
    msg += 'VmStk:  %d bytes' % _memory.stacksize()
    msg += 'uncollectable garbage: %r' % gc.garbage
    msg += 'gc.get_count() = %r' % repr(gc.get_count())
    ## Do not do gc.get_objects, because it causes nltk to
    ## load stuff that is not actually in memory yet!
    #msg += 'current objects: %r' % gc.get_objects()
    return msg
Ejemplo n.º 2
0
def test_memory():
    print 'VmSize: %d bytes' % _memory.memory()
    print 'VmRSS:  %d bytes' % _memory.resident()
    print 'VmStk:  %d bytes' % _memory.stacksize()