Changeset 7093
- Timestamp:
- May 27, 2009, 8:24:34 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/numpy/anuga/utilities/log.py
r7092 r7093 198 198 '''Log memory usage at given log level.''' 199 199 200 _scale = {'KB': 1024, 'MB': 1024*1024, 'GB': 1024*1024*1024, 201 'kB': 1024, 'mB': 1024*1024, 'gB': 1024*1024*1024} 202 200 203 if sys.platform != 'win32': 201 204 _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 205 206 def _VmB(VmKey): 206 207 '''Get number of virtual bytes used.''' … … 275 276 276 277 if __name__ == '__main__': 277 ## critical('Testing exception capturing') 278 critical('#' * 80) 279 warning('Test of logging...') 278 280 def test_it(num=100): 279 281 if num > 0: … … 286 288 a = num.zeros((1000,1000), num.float) 287 289 288 test_it()289 290 info('sys.version_info=%s, _new_python=%s' 290 291 % (str(sys.version_info), str(_new_python))) 292 test_it()
Note: See TracChangeset
for help on using the changeset viewer.