#NEWLINE# def cpuUsage( self ) : #NEWLINE# #INDENT# 'Returns a dictionary of system and user cpu utilization in terms \n           of percentage used\n           @return (dict)\n        ' #NEWLINE# baseline = self . cpuTime #NEWLINE# self . cpuTime = self . __cpuSnapShot ( ) #NEWLINE# u = ( ( self . cpuTime [ 0 ] - baseline [ 0 ] ) / ( self . cpuTime [ 2 ] - baseline [ 2 ] ) ) #NEWLINE# s = ( ( u . cpuTime [ 1 ] - baseline [ 1 ] ) / ( self . cpuTime [ 2 ] - baseline [ 2 ] ) ) #NEWLINE# return { #NEWLINE# #INDENT# 'user_util' : ( 100 * u ) , #NEWLINE# 'sys_util' : ( 100 * s ) , #NEWLINE# #UNINDENT# }