Changeset 7093


Ignore:
Timestamp:
May 27, 2009, 8:24:34 AM (11 years ago)
Author:
rwilson
Message:

Fixed bug with Windows resource logging function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/numpy/anuga/utilities/log.py

    r7092 r7093  
    198198    '''Log memory usage at given log level.'''
    199199
     200    _scale = {'KB': 1024, 'MB': 1024*1024, 'GB': 1024*1024*1024,
     201              'kB': 1024, 'mB': 1024*1024, 'gB': 1024*1024*1024}
     202
    200203    if sys.platform != 'win32':
    201204        _proc_status = '/proc/%d/status' % os.getpid()
    202         _scale = {'KB': 1024, 'MB': 1024*1024, 'GB': 1024*1024*1024,
    203                   'kB': 1024, 'mB': 1024*1024, 'gB': 1024*1024*1024}
    204 
     205       
    205206        def _VmB(VmKey):
    206207            '''Get number of virtual bytes used.'''
     
    275276
    276277if __name__ == '__main__':
    277 ##    critical('Testing exception capturing')
     278    critical('#' * 80)
     279    warning('Test of logging...')
    278280    def test_it(num=100):
    279281        if num > 0:
     
    286288    a = num.zeros((1000,1000), num.float)
    287289
    288     test_it()
    289290    info('sys.version_info=%s, _new_python=%s'
    290291         % (str(sys.version_info), str(_new_python)))
     292    test_it()
Note: See TracChangeset for help on using the changeset viewer.