Bug 1196253 - update in-tree psutil to 3.1.1. r=gps

This commit is contained in:
Joel Maher
2015-08-20 08:03:31 -04:00
parent e27f1455ab
commit 6fabf5a7a3
73 changed files with 6544 additions and 3863 deletions

View File

@@ -31,7 +31,6 @@ Sout : 0B
"""
import psutil
from psutil._compat import print_
def bytes2human(n):
@@ -56,13 +55,13 @@ def pprint_ntuple(nt):
value = getattr(nt, name)
if name != 'percent':
value = bytes2human(value)
print_('%-10s : %7s' % (name.capitalize(), value))
print('%-10s : %7s' % (name.capitalize(), value))
def main():
print_('MEMORY\n------')
print('MEMORY\n------')
pprint_ntuple(psutil.virtual_memory())
print_('\nSWAP\n----')
print('\nSWAP\n----')
pprint_ntuple(psutil.swap_memory())
if __name__ == '__main__':